diff --git a/README.md b/README.md index f9a2f50..a800182 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,4 @@ Android port of OMORI RPG game * Put original assets to folders * Install cordova * `cordova platform add android` -* `debug-run.sh` or `build-apk.sh` +* `debug-run.sh android` or `build-apk.sh` diff --git a/build-apk.sh b/build-apk.sh index f158c5d..dc252f6 100755 --- a/build-apk.sh +++ b/build-apk.sh @@ -60,7 +60,7 @@ build_variant() { fi python3 scripts/replace_special_symbols.py python3 scripts/create_listing.py - echo "* Building $1 version..." + echo "* Building $1 apk..." cordova build android --prod --release mv platforms/android/app/build/outputs/apk/release/app-release.apk output/app-release-$1.apk } diff --git a/debug-run.sh b/debug-run.sh index 9c8d10d..7ab6fe2 100755 --- a/debug-run.sh +++ b/debug-run.sh @@ -61,14 +61,18 @@ build_variant() { fi python3 scripts/replace_special_symbols.py python3 scripts/create_listing.py - echo "* Building $1 version..." - cordova build android + if [[ "$2" == "android" ]]; then + echo "* Building $1 apk..." + cordova build android + fi } VARIANT="br" # eng/rus/br -build_variant $VARIANT +build_variant $VARIANT $1 -adb shell am force-stop su.viende.omori -adb install platforms/android/app/build/outputs/apk/debug/app-debug.apk -adb shell am start -n "su.viende.omori/su.viende.omori.MainActivity" \ No newline at end of file +if [[ "$1" == "android" ]]; then + adb shell am force-stop su.viende.omori + adb install platforms/android/app/build/outputs/apk/debug/app-debug.apk + adb shell am start -n "su.viende.omori/su.viende.omori.MainActivity" +fi \ No newline at end of file