diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-06-25 15:06:11 +0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-06-25 20:21:13 +0800 |
commit | d35c3c0fbf5333eb6c2ce86fb05ff4e0c3efd802 (patch) | |
tree | 3d6136effe8ce3eeda5f3067aa93b4d4ab3e474b /packaging/windows/mxe-based-build.sh | |
parent | dde2049027a483b2e211747e6f18d560a88c28bf (diff) | |
download | subsurface-d35c3c0fbf5333eb6c2ce86fb05ff4e0c3efd802.tar.gz |
build-system: detect libdivecomputer changes in MXE build
Automatically trigger a rebuild of libdivecomputer if it has changed
since the last build.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/windows/mxe-based-build.sh')
-rwxr-xr-x | packaging/windows/mxe-based-build.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packaging/windows/mxe-based-build.sh b/packaging/windows/mxe-based-build.sh index 80ed081e0..f7c4f6ac0 100755 --- a/packaging/windows/mxe-based-build.sh +++ b/packaging/windows/mxe-based-build.sh @@ -173,7 +173,9 @@ if [ ! -f libdivecomputer/configure ] ; then fi cd "$BUILDDIR" -if [[ ! -d libdivecomputer || -f build.libdivecomputer ]] ; then +CURRENT_SHA=$(cd "$BASEDIR"/subsurface/libdivecomputer ; git describe) +PREVIOUS_SHA=$(cat "libdivecomputer.SHA" 2>/dev/null || echo) +if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] || [ ! -d libdivecomputer ] || [ -f build.libdivecomputer ] ; then rm -f build.libdivecomputer mkdir -p libdivecomputer cd libdivecomputer |