diff options
author | Anton Lundin <glance@acc.umu.se> | 2018-05-14 22:13:21 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-17 07:36:44 -0700 |
commit | 05e6c2dfaa0280dd1a098d1ade66dce389402b6a (patch) | |
tree | 57f5b653e47395eabbdacdd493f30a2e5b5c3e2b /packaging/android/build.sh | |
parent | a8c47cb75dd0246e5386f28592c88dc5951a8351 (diff) | |
download | subsurface-05e6c2dfaa0280dd1a098d1ade66dce389402b6a.tar.gz |
android-build: Simplify and correct
This simplifies the code and uses correct quoting for variables.
This also fixes the sha1-stampfile handling so that we don't build
libdivecomputer every time.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Diffstat (limited to 'packaging/android/build.sh')
-rwxr-xr-x | packaging/android/build.sh | 8 |
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 |