aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Rolf Eike Beer <eike@sf-mail.de>2019-03-04 18:52:40 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-03-05 13:27:54 -0800
commit3664cc4ee6f9dc4e0d68bc3f0dc51ef2c8fadd95 (patch)
tree92a6207a67da1512c4ee4f4d8a9f1cf27bee8055
parent9bbb6f785ca480c639439acb32bdcbff62c438ae (diff)
downloadsubsurface-3664cc4ee6f9dc4e0d68bc3f0dc51ef2c8fadd95.tar.gz
Android: factor out duplicate version string search
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
-rwxr-xr-xpackaging/android/build.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index 6f2ae8e1f..1cf013ead 100755
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -433,16 +433,15 @@ cmake $MOBILE_CMAKE \
rm -f ssrf-version.h
make version
+SUBSURFACE_VERSION=$(grep CANONICAL_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \")
if [ ! -z "$SUBSURFACE_MOBILE" ] ; then
SUBSURFACE_MOBILE_VERSION=$(grep MOBILE_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \" )
- SUBSURFACE_MOBILE_VERSION="$SUBSURFACE_MOBILE_VERSION ($(grep CANONICAL_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \"))"
+ SUBSURFACE_MOBILE_VERSION="$SUBSURFACE_MOBILE_VERSION (${SUBSURFACE_VERSION})"
rm -rf android-mobile
cp -a "$SUBSURFACE_SOURCE/android-mobile" .
sed -i -e "s/@SUBSURFACE_MOBILE_VERSION@/$SUBSURFACE_MOBILE_VERSION/;s/@BUILD_NR@/$BUILD_NR/" android-mobile/AndroidManifest.xml
else
- SUBSURFACE_VERSION=$(grep CANONICAL_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \")
-
# android-mobile is hardcoded in CMakeLists.txt nowadays.
rm -rf android-mobile
cp -a "$SUBSURFACE_SOURCE/android" android-mobile