-
Notifications
You must be signed in to change notification settings - Fork 199
/
update_dependencies.sh
executable file
·79 lines (71 loc) · 1.9 KB
/
update_dependencies.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
set -e
# silence push/pop
pushd() {
command pushd "$@" >/dev/null
}
popd() {
command popd "$@" >/dev/null
}
FORCE=false
for var in "$@"; do
if [[ $var = "force" ]]; then
FORCE=true
fi
done
function installRiveCpp {
if [ $FORCE == "true" ] || [ ! -d rive-cpp ]; then
rm -fR rive-cpp
if [ -d ../../runtime ]; then
echo "Getting rive-cpp from current repo."
export INSTALL_TO=$PWD
mkdir -p rive-cpp
pushd ../../runtime
function copyRepoFile {
mkdir -p $(dirname $INSTALL_TO/rive-cpp/$1)
cp $1 $INSTALL_TO/rive-cpp/$1
echo -en "\r\033[K$1"
}
export -f copyRepoFile
git ls-files | xargs -n1 bash -c 'copyRepoFile "$@"' _
echo -en "\r\033[K"
popd
else
echo "Cloning rive-cpp."
git clone https://github.com/rive-app/rive-cpp
fi
# TODO: Fix this so we build the rive.podspec file based on paths determined
# here (for harfbuzz and sheenbidi)
#
# install dependencies from rive-cpp
# pushd rive-cpp/dependencies/macosx
# source config_directories.sh
# popd
# pushd rive-cpp
# ./build.sh
# popd
fi
# For now just manually install the deps.
if [ $FORCE == "true" ] || [ ! -d harfbuzz ]; then
rm -fR harfbuzz
echo "Cloning Harfbuzz."
git clone https://github.com/harfbuzz/harfbuzz
pushd harfbuzz
git checkout "6.0.0" .
popd
fi
if [ $FORCE == "true" ] || [ ! -d SheenBidi ]; then
rm -fR SheenBidi
echo "Cloning SheenBidi."
git clone https://github.com/Tehreer/SheenBidi.git
pushd SheenBidi
git checkout v2.6 .
popd
fi
}
pushd macos
installRiveCpp
popd
pushd ios
installRiveCpp
popd