From d35c3c0fbf5333eb6c2ce86fb05ff4e0c3efd802 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 25 Jun 2018 15:06:11 +0800 Subject: 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 --- packaging/windows/mxe-based-build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2