From 3664cc4ee6f9dc4e0d68bc3f0dc51ef2c8fadd95 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Mon, 4 Mar 2019 18:52:40 +0100 Subject: Android: factor out duplicate version string search Signed-off-by: Rolf Eike Beer --- packaging/android/build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packaging/android/build.sh') 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 -- cgit v1.2.3-70-g09d2