-
Notifications
You must be signed in to change notification settings - Fork 25
/
install-dependencies.sh
executable file
·59 lines (43 loc) · 1.32 KB
/
install-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
#!/usr/bin/env bash
set -euo pipefail
## Git submodules
git submodule update --init
## Utils
function homebrewInstall() {
local formula=$1
brew list $formula &>/dev/null || brew install $formula
}
## Homebrew packages
if ! [ "$(command -v brew)" ]; then
echo "Please install Homebrew: https://brew.sh/"
exit 1
fi
homebrewInstall cmake
homebrewInstall swiftlint
homebrewInstall ccache
homebrewInstall clang-format
homebrewInstall git-lfs
homebrewInstall libiconv
## CocoaPods #################################################################
if ! [ "$(command -v pod)" ]; then
echo "CocoaPods is required to continue. Please install CocoaPods by"
echo "running `sudo gem install cocoapods`."
echo "See more: https://cocoapods.org/"
exit 1
fi
## xcpretty ###################################################################
if ! [ "$(command -v xcpretty)" ]; then
echo "Pretty please install xcpretty:"
echo "https://github.com/xcpretty/xcpretty"
echo "Pretty please run: $ gem install xcpretty"
exit 1
fi
if ! test -e .git/hooks/pre-commit; then
pushd .git/hooks &>/dev/null
echo "Installing git pre-commit hook"
ln -s ../../pre-commit.sh pre-commit
popd &>/dev/null
fi
pod install
echo "Finished installing and updating dependencies"
echo "Please open StandardCyborgSDK.xcworkspace"