forked from Tencent/libpag
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync_deps.sh
More file actions
executable file
·31 lines (27 loc) · 787 Bytes
/
sync_deps.sh
File metadata and controls
executable file
·31 lines (27 loc) · 787 Bytes
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
#!/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
TOOL='emscripten'
fi
echo "$TOOL not found. Trying to install..."
brew install $TOOL || exit 1
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