forked from Tencent/libpag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsync_deps.sh
executable file
·35 lines (31 loc) · 914 Bytes
/
sync_deps.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
#!/bin/bash -e
cd $(dirname $0)
if [[ `uname` == 'Darwin' ]]; then
MAC_REQUIRED_TOOLS="node cmake ninja yasm git-lfs emcc"
for TOOL in ${MAC_REQUIRED_TOOLS[@]}; do
if [ ! $(which $TOOL) ]; then
if [ ! $(which brew) ]; then
echo "Homebrew not found. Trying to install..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ||
exit 1
fi
if [ $TOOL == 'emcc' ]; then
echo "emscripten not found. Trying to install..."
sh ./web/script/install-emscripten.sh || exit 1
else
echo "$TOOL not found. Trying to install..."
brew install $TOOL || exit 1
fi
fi
done
fi
NODE_REQUIRED_TOOLS="depsync"
for TOOL in ${NODE_REQUIRED_TOOLS[@]}; do
if [ ! $(which $TOOL) ]; then
echo "$TOOL not found. Trying to install..."
npm install -g $TOOL > /dev/null
fi
done
depsync
git lfs prune
git lfs pull