mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-13 01:17:21 -04:00
Stop using backticks in Shell script
This commit is contained in:
parent
49367ee469
commit
48de529bcf
@ -22,9 +22,9 @@ function die {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# default values are guessed from repo (AndroidManifest and res/values/branding)
|
# default values are guessed from repo (AndroidManifest and res/values/branding)
|
||||||
APP_NAME=`python -c "from xml.dom.minidom import parse; d=parse('res/values/branding.xml'); print([e.childNodes[0].data.strip() for e in d.getElementsByTagName('string') if e.getAttribute('name') == 'app_name'][-1])"`
|
APP_NAME=$(python -c "from xml.dom.minidom import parse; d=parse('res/values/branding.xml'); print([e.childNodes[0].data.strip() for e in d.getElementsByTagName('string') if e.getAttribute('name') == 'app_name'][-1])")
|
||||||
TARGET_VERSION=`grep "compileSdkVersion" build.gradle | awk '{print $2}'`
|
TARGET_VERSION=$(grep "compileSdkVersion" build.gradle | awk '{print $2}')
|
||||||
BUILD_VERSION=`grep "buildToolsVersion" build.gradle | awk '{print $2}' | sed 's/"//g'`
|
BUILD_VERSION=$(grep "buildToolsVersion" build.gradle | awk '{print $2}' | sed 's/"//g')
|
||||||
|
|
||||||
if [ "x$2" != "x" ];
|
if [ "x$2" != "x" ];
|
||||||
then
|
then
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# default value is guessed from repo (AndroidManifest)
|
# default value is guessed from repo (AndroidManifest)
|
||||||
PACKAGE=`python -c "from xml.dom.minidom import parse; d=parse('app/src/main/AndroidManifest.xml'); print([e.getAttribute('package').strip() for e in d.getElementsByTagName('manifest')][-1])"`
|
PACKAGE=$(python -c "from xml.dom.minidom import parse; d=parse('app/src/main/AndroidManifest.xml'); print([e.getAttribute('package').strip() for e in d.getElementsByTagName('manifest')][-1])")
|
||||||
|
|
||||||
if [ "x$1" != "x" ];
|
if [ "x$1" != "x" ];
|
||||||
then
|
then
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
if hash adb 2>/dev/null
|
if hash adb 2>/dev/null
|
||||||
then
|
then
|
||||||
ADB=`which adb`
|
ADB=$(which adb)
|
||||||
TMP=/data/local/tmp/
|
TMP=/data/local/tmp/
|
||||||
FILE=${1:-screenshot.png}
|
FILE=${1:-screenshot.png}
|
||||||
PATH=$TMP$FILE
|
PATH=$TMP$FILE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user