Skip to content
Snippets Groups Projects

buildsystem: make get-vlc.sh work from any directories

Closed Thomas Guillem requested to merge tguillem/libvlcjni:fix-get-vlc.sh into master
1 file
+ 6
3
Compare changes
  • Side-by-side
  • Inline
+ 6
3
#! /bin/sh
set -e
readonly SCRIPT_DIR="$(cd "$(dirname "$0")" ; pwd -P)"
#############
# FUNCTIONS #
#############
@@ -70,6 +72,7 @@ done
VLC_TESTED_HASH=488ee616e5c94e516563095c6b3ac3a85cf72871
VLC_REPOSITORY=https://code.videolan.org/videolan/vlc.git
VLC_BRANCH=master
VLC_PATCHES=${SCRIPT_DIR}/../libvlc/patches
if [ ! -d "vlc" ]; then
diagnostic "VLC sources: not found, cloning"
git clone "${VLC_REPOSITORY}" vlc -b ${VLC_BRANCH} --single-branch || fail "VLC sources: git clone failed"
@@ -78,7 +81,7 @@ if [ ! -d "vlc" ]; then
git reset --hard ${VLC_TESTED_HASH} || fail "VLC sources: VLC_TESTED_HASH ${VLC_TESTED_HASH} not found"
diagnostic "VLC sources: applying custom patches"
# Keep Message-Id inside commits description to track them afterwards
git am --message-id ../libvlcjni/libvlc/patches/*.patch || fail "VLC sources: cannot apply custom patches"
git am --message-id ${VLC_PATCHES}/*.patch || fail "VLC sources: cannot apply custom patches"
cd ..
else
diagnostic "VLC source: found sources, leaving untouched"
@@ -88,7 +91,7 @@ if [ "$BYPASS_VLC_SRC_CHECKS" = 1 ]; then
elif [ $RESET -eq 1 ]; then
cd vlc
git reset --hard ${VLC_TESTED_HASH} || fail "VLC sources: VLC_TESTED_HASH ${VLC_TESTED_HASH} not found"
for patch_file in ../libvlcjni/libvlc/patches/*.patch; do
for patch_file in ${VLC_PATCHES}/*.patch; do
git am --message-id $patch_file
check_patch_is_applied "$patch_file"
done
@@ -99,7 +102,7 @@ else
cd vlc
git cat-file -e ${VLC_TESTED_HASH} 2> /dev/null || \
fail "Error: Your vlc checkout does not contain the latest tested commit: ${VLC_TESTED_HASH}"
for patch_file in ../libvlcjni/libvlc/patches/*.patch; do
for patch_file in ${VLC_PATCHES}/*.patch; do
check_patch_is_applied "$patch_file"
done
cd ..
Loading