[Android] compile.sh: harmonize VLC source fetching

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


vlc-android | branch: master | Simon Latapie <garf at videolan.org> | Thu Jul 18 10:16:19 2019 +0200| [4769cbfcdee6e8f1680d7f8ddcefdf82d1ad9761] | committer: Simon Latapie

compile.sh: harmonize VLC source fetching

Fetching sources, resetting to TESTED_HASH or applying custom patches
should not depend on RELEASE

> https://code.videolan.org/videolan/vlc-android/commit/4769cbfcdee6e8f1680d7f8ddcefdf82d1ad9761
---

 compile.sh | 32 +++++++++++++-------------------
 1 file changed, 13 insertions(+), 19 deletions(-)

diff --git a/compile.sh b/compile.sh
index 01cae5bb0..0664fdc4e 100755
--- a/compile.sh
+++ b/compile.sh
@@ -243,29 +243,23 @@ fi
 
 TESTED_HASH=ee139ff
 if [ ! -d "vlc" ]; then
-    diagnostic "VLC source not found, cloning"
+    diagnostic "VLC sources: not found, cloning"
     git clone https://git.videolan.org/git/vlc/vlc-3.0.git vlc
-    checkfail "vlc source: git clone failed"
-    if [ "$RELEASE" != 1 ]; then
-        cd vlc && git am ../libvlc/patches/vlc3/*.patch && cd ..
-    fi
-fi
-diagnostic "VLC source found"
-cd vlc
-if ! git cat-file -e ${TESTED_HASH}; then
-    cat 1>&2 << EOF
-***
-*** Error: Your vlc checkout does not contain the latest tested commit: ${TESTED_HASH}
-***
-EOF
-    exit 1
-fi
-if [ "$RELEASE" = 1 ]; then
+    checkfail "VLC sources: git clone failed"
+    diagnostic "VLC sources: resetting to the TESTED_HASH commit (${TESTED_HASH})"
     git reset --hard ${TESTED_HASH}
+    checkfail "VLC sources: TESTED_HASH ${TESTED_HASH} not found"
+    diagnostic "VLC sources: applying custom patches"
+    cd vlc
     git am ../libvlc/patches/vlc3/*.patch
+    checkfail "VLC sources: cannot apply custom patches"
+    cd ..
+else
+    diagnostic "VLC source: found sources, leaving untouched"
 fi
-cd ..
-
+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}"
 
 ############
 # Make VLC #



More information about the Android mailing list