use App Name to set android label
This commit is contained in:
parent
f4e85c0990
commit
5b89a03bcd
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "USAGE: $0 PACKAGE_NAME DESCRIPTION"
|
||||
echo "USAGE: $0 APP_NAME DESCRIPTION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -9,9 +9,11 @@ PROJECT_HOME=~/AndroidStudioProjects
|
|||
ORG_PATH="$PROJECT_HOME/defaultOrg"
|
||||
KEY_PROPERTIES_PATH="$PROJECT_HOME/defaultKeyProperties"
|
||||
|
||||
packageName="$1"
|
||||
appName="$1"
|
||||
packageName=`echo "$appName" | tr '[:upper:]' '[:lower:]'`
|
||||
description="$2"
|
||||
|
||||
echo "App Name: $appName"
|
||||
echo "Package Name: $packageName"
|
||||
echo "Description: $description"
|
||||
|
||||
|
@ -255,11 +257,17 @@ dependencies {
|
|||
|
||||
EOF
|
||||
|
||||
#######################
|
||||
## set android label ##
|
||||
#######################
|
||||
|
||||
sed -i "s/android:label=\"$packageName\"/android:label=\"$appName\"/" android/app/src/main/AndroidManifest.xml
|
||||
|
||||
#####################
|
||||
## empty README.md ##
|
||||
#####################
|
||||
cat > README.md <<EOF
|
||||
# $packageName
|
||||
# $appName
|
||||
|
||||
$description
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user