From 5b89a03bcd0432e4360d2a3745451aa730746962 Mon Sep 17 00:00:00 2001 From: gutmet Date: Wed, 20 May 2020 00:59:58 +0200 Subject: [PATCH] use App Name to set android label --- createFlutter | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/createFlutter b/createFlutter index 2fd4197..8602306 100755 --- a/createFlutter +++ b/createFlutter @@ -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 <