-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·25 lines (18 loc) · 833 Bytes
/
setup.sh
File metadata and controls
executable file
·25 lines (18 loc) · 833 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
#!/usr/bin/env bash
if [ "$(uname)" != "Darwin" ]; then
echo "This script only runs on Mac!"
exit 1
fi
command -v brew >/dev/null || { echo "Homebrew not installed. Installing..."; /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; }
command -v ipopt >/dev/null || { echo "Ipopt not installed. Installing..."; brew install dartsim/dart/ipopt; }
command -v cmake >/dev/null || { echo "CMake not installed. Installing..."; brew install cmake; }
#check if libglew exists
echo "int main(){}" | gcc -o /dev/null -x c - -lglew 2>/dev/null
if [ $? -eq 1 ]; then
echo "LibGlew not installed. Installing..."
brew install glew
fi
command -v gnuplot >/dev/null || { echo "Gnuplot not installed. Installing..."; brew install gnuplot --with-qt; }
echo ""
echo ""
echo "DONE!"