mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 00:13:24 +00:00
Android: factor out duplicate version string search
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
This commit is contained in:
parent
9bbb6f785c
commit
3664cc4ee6
1 changed files with 2 additions and 3 deletions
|
@ -433,16 +433,15 @@ cmake $MOBILE_CMAKE \
|
||||||
rm -f ssrf-version.h
|
rm -f ssrf-version.h
|
||||||
make version
|
make version
|
||||||
|
|
||||||
|
SUBSURFACE_VERSION=$(grep CANONICAL_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \")
|
||||||
if [ ! -z "$SUBSURFACE_MOBILE" ] ; then
|
if [ ! -z "$SUBSURFACE_MOBILE" ] ; then
|
||||||
SUBSURFACE_MOBILE_VERSION=$(grep MOBILE_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \" )
|
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
|
rm -rf android-mobile
|
||||||
cp -a "$SUBSURFACE_SOURCE/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
|
sed -i -e "s/@SUBSURFACE_MOBILE_VERSION@/$SUBSURFACE_MOBILE_VERSION/;s/@BUILD_NR@/$BUILD_NR/" android-mobile/AndroidManifest.xml
|
||||||
else
|
else
|
||||||
SUBSURFACE_VERSION=$(grep CANONICAL_VERSION_STRING ssrf-version.h | awk '{ print $3 }' | tr -d \")
|
|
||||||
|
|
||||||
# android-mobile is hardcoded in CMakeLists.txt nowadays.
|
# android-mobile is hardcoded in CMakeLists.txt nowadays.
|
||||||
rm -rf android-mobile
|
rm -rf android-mobile
|
||||||
cp -a "$SUBSURFACE_SOURCE/android" android-mobile
|
cp -a "$SUBSURFACE_SOURCE/android" android-mobile
|
||||||
|
|
Loading…
Add table
Reference in a new issue