Stop using backticks in Shell script

This commit is contained in:
Kelson 2019-08-26 16:25:34 +02:00
parent 49367ee469
commit 48de529bcf
3 changed files with 5 additions and 5 deletions

View File

@ -22,9 +22,9 @@ function die {
}
# 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])"`
TARGET_VERSION=`grep "compileSdkVersion" build.gradle | awk '{print $2}'`
BUILD_VERSION=`grep "buildToolsVersion" build.gradle | awk '{print $2}' | sed 's/"//g'`
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}')
BUILD_VERSION=$(grep "buildToolsVersion" build.gradle | awk '{print $2}' | sed 's/"//g')
if [ "x$2" != "x" ];
then

View File

@ -1,7 +1,7 @@
#!/bin/bash
# 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" ];
then

View File

@ -2,7 +2,7 @@
if hash adb 2>/dev/null
then
ADB=`which adb`
ADB=$(which adb)
TMP=/data/local/tmp/
FILE=${1:-screenshot.png}
PATH=$TMP$FILE