-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprereqs_mac.sh
More file actions
executable file
·52 lines (42 loc) · 1.05 KB
/
prereqs_mac.sh
File metadata and controls
executable file
·52 lines (42 loc) · 1.05 KB
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
#!/bin/bash
getScriptPath () {
echo ${0%/*}/
}
myPath=$(getScriptPath)
. ${myPath}/lib.sh
# You're gonna need xcode already installed.
# Install brew if it's not there.
if [[ ! -x $(which brew) ]]; then
echo_i "Installing brew."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
if [ $? -ne 0 ]
then
echo_e "Failed to install brew"
exit 2
fi
fi
packagesToInstall=
if [[ ! -x $(which qmake) ]]; then
echo_i "Instalilng qt"
packagesToInstall+="qt "
fi
if [[ ! -x $(which ffmpeg) ]]; then
echo_i "Instaling ffmpeg"
packagesToInstall+="ffmpeg "
fi
if [[ ! -x $(which create-dmg) ]]; then
echo_i "Instalilng create-dmg"
packagesToInstall+="create-dmg "
fi
if [[ ! -x /usr/local/opt/llvm/bin/clang ]]; then
echo_i "Installing llvm/clang"
packagesToInstall+="llvm libomp"
fi
if [ -n "$packagesToInstall" ]; then
brew install $packagesToInstall
if [ $? -ne 0 ]
then
echo_e "Failed to install required packages"
exit 2
fi
fi