[Android] compile.sh: add an option to bypass VLC source checks

Simon Latapie git at videolan.org
Fri Jul 26 17:16:11 CEST 2019


vlc-android | branch: master | Simon Latapie <garf at videolan.org> | Fri Jul 26 14:03:26 2019 +0200| [18d578ec3325951093d5f1dea6565221c6576851] | committer: Simon Latapie

compile.sh: add an option to bypass VLC source checks

> https://code.videolan.org/videolan/vlc-android/commit/18d578ec3325951093d5f1dea6565221c6576851
---

 compile.sh | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/compile.sh b/compile.sh
index e337bd719..be9fffce2 100755
--- a/compile.sh
+++ b/compile.sh
@@ -60,6 +60,7 @@ while [ $# -gt 0 ]; do
             echo "Use -s to set your keystore file and -p for the password"
             echo "Use -c to get a ChromeOS build"
             echo "Use -l to build only LibVLC"
+            echo "Use -b to bypass libvlc source checks (vlc custom sources)"
             exit 0
             ;;
         a|-a)
@@ -104,6 +105,9 @@ while [ $# -gt 0 ]; do
         --init)
             GRADLE_SETUP=1
             ;;
+        -b)
+            BYPASS_VLC_SRC_CHECKS=1
+            ;;
         *)
             diagnostic "$0: Invalid option '$1'."
             diagnostic "$0: Try --help for more information."
@@ -283,14 +287,19 @@ if [ ! -d "vlc" ]; then
 else
     diagnostic "VLC source: found sources, leaving untouched"
 fi
-diagnostic "VLC sources: Checking TESTED_HASH and patches presence"
-cd vlc
-git cat-file -e ${TESTED_HASH} 2> /dev/null
-checkfail "Error: Your vlc checkout does not contain the latest tested commit: ${TESTED_HASH}"
-for patch_file in ../libvlc/patches/vlc3/*.patch; do
-    check_patch_is_applied "$patch_file"
-done
-cd ..
+if [ "$BYPASS_VLC_SRC_CHECKS" = 1 ]; then
+    diagnostic "VLC sources: Bypassing checks (required by option)"
+else
+    diagnostic "VLC sources: Checking TESTED_HASH and patches presence"
+    diagnostic "NOTE: checks can be bypass by adding '-b' option to this script."
+    cd vlc
+    git cat-file -e ${TESTED_HASH} 2> /dev/null
+    checkfail "Error: Your vlc checkout does not contain the latest tested commit: ${TESTED_HASH}"
+    for patch_file in ../libvlc/patches/vlc3/*.patch; do
+        check_patch_is_applied "$patch_file"
+    done
+    cd ..
+fi
 
 ############
 # Make VLC #



More information about the Android mailing list