summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpackaging/android/build.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index fc4845196..7c153865e 100755
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -366,21 +366,19 @@ if [ -e "$PREFIX/lib/libftdi1.so" ] ; then
rm "$PREFIX"/lib/libftdi1.so*
fi
-if [ ! -f libdivecomputer-${ARCH}.SHA ] ; then
- echo "" > libdivecomputer-${ARCH}.SHA
-fi
pushd "$SUBSURFACE_SOURCE"
git submodule update --recursive
popd
CURRENT_SHA=$(cd "$SUBSURFACE_SOURCE"/libdivecomputer ; git describe)
-PREVIOUS_SHA=$(cat libdivecomputer-${ARCH}.SHA)
-if [[ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" || ! -e "$PKG_CONFIG_LIBDIR/libdivecomputer.pc" ]] ; then
+PREVIOUS_SHA=$(cat "libdivecomputer-${ARCH}.SHA" 2>/dev/null || echo)
+if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] || [ ! -e "$PKG_CONFIG_LIBDIR/libdivecomputer.pc" ] ; then
mkdir -p libdivecomputer-build-"$ARCH"
pushd libdivecomputer-build-"$ARCH"
"$SUBSURFACE_SOURCE"/libdivecomputer/configure --host=${BUILDCHAIN} --prefix="$PREFIX" --enable-static --disable-shared --enable-examples=no
make
make install
popd
+ echo "$CURRENT_SHA" > "libdivecomputer-${ARCH}.SHA"
fi
if [ ! -e qt-android-cmake ] ; then