-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathupdate_dependencies.sh
executable file
·93 lines (84 loc) · 2.71 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/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
if git rev-parse --git-dir >/dev/null 2>&1; then
mkdir -p rive-cpp
# cp -fR ../../runtime rive-cpp
# git clone machine1:/path/to/project machine2:/target/path
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
# We're probably inside a Docker container, so expect a "clean"
# ../../runtime folder.
echo "Use a symbolic link."
ln -s ../../runtime "$INSTALL_TO/rive-cpp"
fi
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 --depth 1 --branch "rive_8.3.0" https://github.com/rive-app/harfbuzz.git
fi
if [ $FORCE == "true" ] || [ ! -d SheenBidi ]; then
rm -fR SheenBidi
echo "Cloning SheenBidi."
git clone --depth 1 --branch "v2.6" https://github.com/Tehreer/SheenBidi.git
fi
if [ $FORCE == "true" ] || [ ! -d miniaudio ]; then
rm -fR miniaudio
echo "Cloning miniaudio."
git clone --depth 1 --branch "rive_changes_4" https://github.com/rive-app/miniaudio.git
fi
if [ $FORCE == "true" ] || [ ! -d yoga ]; then
rm -fR yoga
echo "Cloning yoga."
git clone --depth 1 --branch "rive_changes_v2_0_1" https://github.com/rive-app/yoga.git
fi
}
pushd macos
installRiveCpp
popd
pushd ios
installRiveCpp
popd