[Android] Update medialibrary if needed

Geoffrey Métais git at videolan.org
Tue Dec 13 16:22:37 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec 13 16:20:37 2016 +0100| [f94df4465d1766249adfe71ab271a7d6b875f7ab] | committer: Geoffrey Métais

Update medialibrary if needed

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

 compile-libvlc.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 92d8ff3..127bfd0 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -16,6 +16,8 @@ checkfail()
 # ARGUMENTS #
 #############
 
+MEDIALIBRARY_HASH=fca3c80
+
 RELEASE=0
 ASAN=0
 while [ $# -gt 0 ]; do
@@ -783,6 +785,12 @@ if [ ! -d "${MEDIALIBRARY_MODULE_DIR}/medialibrary" ]; then
     echo -e "\e[1m\e[32mmedialibrary source not found, cloning\e[0m"
     git clone http://code.videolan.org/videolan/medialibrary.git "${SRC_DIR}/medialibrary/medialibrary"
     checkfail "medialibrary source: git clone failed"
+else
+    cd ${MEDIALIBRARY_MODULE_DIR}/medialibrary
+    if ! git cat-file -e ${MEDIALIBRARY_HASH}; then
+      git pull --rebase
+    fi
+    cd -
 fi
 
 if [ ! -d "${MEDIALIBRARY_MODULE_DIR}/libvlcpp" ]; then



More information about the Android mailing list