[Android] Add parsing options for compile-libvlc.sh script

Jean-Baptiste Kempf git at videolan.org
Thu Feb 5 19:38:53 CET 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Feb  5 19:16:14 2015 +0100| [f3489489839be8d97f4cb040c1036b7db1b8c00e] | committer: Jean-Baptiste Kempf

Add parsing options for compile-libvlc.sh script

 --help
 --release
 -a ARCH

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

 compile-libvlc.sh |   34 +++++++++++++++++++++-------------
 1 file changed, 21 insertions(+), 13 deletions(-)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 4967bd8..0f6f871 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -12,6 +12,25 @@ checkfail()
     fi
 }
 
+RELEASE=0
+while [ $# -gt 0 ]; do
+    case $1 in
+        help|--help)
+            echo "Use -a to set the ARCH"
+            echo "Use --release to build in release mode"
+            exit 1
+            ;;
+        a|-a)
+            ANDROID_ABI=$2
+            shift
+            ;;
+        release|--release)
+            RELEASE=1
+            ;;
+    esac
+    shift
+done
+
 #############
 # ARGUMENTS #
 #############
@@ -21,7 +40,8 @@ if [ -z "$ANDROID_NDK" ]; then
 fi
 
 if [ -z "$ANDROID_ABI" ]; then
-    echo "Please set ANDROID_ABI to your architecture:
+    echo "Please pass the ANDROID ABI to the correct architecture, using
+                compile-libvlc.sh -a ARCH
     ARM:     armeabi-v7a, armeabi, armeabi-v5, armeabi-nofpu
     ARM64:   arm64-v8a
     X86:     x86, x86_64
@@ -29,18 +49,6 @@ if [ -z "$ANDROID_ABI" ]; then
     exit 1
 fi
 
-RELEASE=0
-for i in ${@}; do
-    case "$i" in
-        release|--release)
-        RELEASE=1
-        ;;
-        *)
-        ;;
-    esac
-done
-
-
 #########
 # FLAGS #
 #########



More information about the Android mailing list