-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy path_do_pull.sh
45 lines (37 loc) · 1.23 KB
/
_do_pull.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /bin/sh
if [ -z "$BILI_VLC_ROOT" ]; then
echo "_do_pull.sh is not supposed been executed directly"
echo "execute _pull_xxx.sh instead"
exit 1
fi
BILI_VLC_ANDROID_HASH=de1641d
echo "pull "${BILI_VLC_ROOT}":"${BILI_VLC_ANDROID_HASH}
if [ ! -d ${BILI_VLC_ROOT} ]; then
echo "vlc-ports/android source not found, cloning"
git clone git://git.videolan.org/vlc-ports/android ${BILI_VLC_ROOT}
cd ${BILI_VLC_ROOT}
git checkout -B bili ${BILI_VLC_ANDROID_HASH}
cd -
else
echo "vlc-ports/android source found, pulling from remote master"
cd ${BILI_VLC_ROOT}
git fetch origin
git checkout -B bili ${BILI_VLC_ANDROID_HASH}
cd -
fi
echo "patch "${BILI_VLC_MODULE_MODE} ${BILI_VLC_TARGET_MODE}
cd ${BILI_VLC_ROOT}
if [ -f ../patches/ports-android/cherry-picks.list ]; then
commits=$(cat ../patches/ports-android/cherry-picks.list)
for c in $commits; do
git cherry-pick $c || exit 1
done
fi
git am --abort
git am ../patches/ports-android/*.patch
git am ../patches/ports-android/${BILI_VLC_MODULE_MODE}/*.patch
git am ../patches/ports-android/${BILI_VLC_TARGET_MODE}/*.patch
mkdir -p patches
rm patches/100*.patch
cp ../patches/vlc/${BILI_VLC_MODULE_MODE}/100*.patch patches/
cd -