-
Notifications
You must be signed in to change notification settings - Fork 14
/
setup.sh
executable file
·54 lines (42 loc) · 1.09 KB
/
setup.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
#!/bin/bash
if [ "$(uname -s)" != "Darwin" ]
then
echo "Only Darwin (macOS) systems are supported with this tool. Feel free to create a PR!"
exit -1
fi
if [ "$(which brew)x" == "x" ]
then
echo "Let's start with a sane homebrew environment, download https://brew.sh"
exit -2
fi
if [ "$(which git)x" == "x" ]
then
echo "Looks like there is no git. Please install it and clone this repo instead of downloading it (we have submodules)"
exit -3
fi
realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
git submodule update --init --recursive --remote
brew bundle --file=- <<-EOS
brew "automake"
brew "autoconf"
brew "openssl"
brew "pkg-config"
brew "libtool"
brew "libplist"
brew "lzfse"
EOS
export COMMONCRYPTO=1
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
make -C tools/dt
make -C tools/ldid
make -C tools/img4lib
make -C tools/termz
cp tools/dt/dt bin/
cp tools/ldid/ldid bin/
cp tools/img4lib/img4 bin/
cp tools/termz/termz bin/
OUTPUT_DIR="$(dirname "$0")/bin"
echo "Built your tools in: $OUTPUT_DIR"
echo "Now add '$(realpath $OUTPUT_DIR)' to your system PATH"