[Android] Allow to set the keystore file in argument to compile.sh

Jean-Baptiste Kempf git at videolan.org
Fri Feb 6 09:58:31 CET 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Feb  6 09:57:49 2015 +0100| [b04ea13ca1ff6d09c007a96518162d389370e48d] | committer: Jean-Baptiste Kempf

Allow to set the keystore file in argument to compile.sh

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b04ea13ca1ff6d09c007a96518162d389370e48d
---

 compile-simple.sh |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/compile-simple.sh b/compile-simple.sh
index 773ab2e..301a47e 100755
--- a/compile-simple.sh
+++ b/compile-simple.sh
@@ -16,6 +16,7 @@ while [ $# -gt 0 ]; do
         help|--help)
             echo "Use -a to set the ARCH"
             echo "Use --release to build in release mode"
+            echo "Use -s to set your keystore file"
             exit 1
             ;;
         a|-a)
@@ -25,6 +26,9 @@ while [ $# -gt 0 ]; do
         release|--release)
             RELEASE=1
             ;;
+        -s|--signature)
+            KEYSTORE_FILE=$2
+            shift
     esac
     shift
 done
@@ -34,6 +38,10 @@ if [ -z "$ANDROID_ABI" ]; then
    ANDROID_ABI="armeabi-v7a"
 fi
 
+if [ -z "$KEYSTORE_FILE"]; then
+    KEYSTORE_FILE="$HOME/.android/debug.keystore"
+fi
+
 #############
 # FUNCTIONS #
 #############
@@ -78,7 +86,7 @@ fi
 ####################
 
 if [ ! -f gradle.properties ]; then
-    echo keyStoreFile=$HOME/.android/debug.keystore > gradle.properties
+    echo keyStoreFile=$KEYSTORE_FILE > gradle.properties
     echo storealias=androiddebugkey >> gradle.properties
     echo storepwd=android >> gradle.properties
 fi



More information about the Android mailing list