[Android] Add --fetch and --build options
Rafaël Carré
git at videolan.org
Mon Dec 23 16:51:56 CET 2013
vlc-ports/android | branch: master | Rafaël Carré <funman at videolan.org> | Mon Dec 23 16:51:35 2013 +0100| [87d79f151ec2cb6bfc6f8e83db0c47249911e349] | committer: Rafaël Carré
Add --fetch and --build options
Default is unchanged and perform all the steps
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=87d79f151ec2cb6bfc6f8e83db0c47249911e349
---
compile.sh | 52 +++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 39 insertions(+), 13 deletions(-)
diff --git a/compile.sh b/compile.sh
index a28a916..b31551e 100755
--- a/compile.sh
+++ b/compile.sh
@@ -6,6 +6,21 @@
set -e
+BUILD=
+FETCH=
+case "$1" in
+ --fetch)
+ FETCH=1
+ ;;
+ --build)
+ BUILD=1
+ ;;
+ *)
+ FETCH=1
+ BUILD=1
+ ;;
+esac
+
if [ -z "$ANDROID_NDK" -o -z "$ANDROID_SDK" ]; then
echo "You must define ANDROID_NDK, ANDROID_SDK and ANDROID_ABI before starting."
echo "They must point to your NDK and SDK directories.\n"
@@ -88,18 +103,20 @@ export PATH=${NDK_TOOLCHAIN_PATH}:${PATH}
ANDROID_PATH="`pwd`"
-# 1/ libvlc, libvlccore and its plugins
-TESTED_HASH=1cd2652
-if [ ! -d "vlc" ]; then
- echo "VLC source not found, cloning"
- git clone git://git.videolan.org/vlc.git vlc
- cd vlc
- git checkout -B android ${TESTED_HASH}
-else
- echo "VLC source found"
- cd vlc
- if ! git cat-file -e ${TESTED_HASH}; then
- cat << EOF
+if [ ! -z "$FETCH" ]
+then
+ # 1/ libvlc, libvlccore and its plugins
+ TESTED_HASH=1cd2652
+ if [ ! -d "vlc" ]; then
+ echo "VLC source not found, cloning"
+ git clone git://git.videolan.org/vlc.git vlc
+ cd vlc
+ git checkout -B android ${TESTED_HASH}
+ else
+ echo "VLC source found"
+ cd vlc
+ if ! git cat-file -e ${TESTED_HASH}; then
+ cat << EOF
***
*** Error: Your vlc checkout does not contain the latest tested commit ***
***
@@ -114,8 +131,17 @@ git checkout -B android ${TESTED_HASH}
*** : This will delete any changes you made to the current branch ***
EOF
- exit 1
+ exit 1
+ fi
fi
+else
+ cd vlc
+fi
+
+if [ -z "$BUILD" ]
+then
+ echo "Not building anything, please run $0 --build"
+ exit 0
fi
if [ ${ANDROID_ABI} = "armeabi-v7a" ] ; then
More information about the Android
mailing list