Skip to content

Commit a8235f5

Browse files
authored
Update install all deps
1 parent a28dcb7 commit a8235f5

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

scripts/install_deps_all.sh

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ OS=$(uname)
44
echo "Detected OS: $OS"
55

66
if [ $OS = "Darwin" ]; then
7-
echo "ERROR: OSX is only for install_deps_req.sh"
7+
echo "ERROR: OSX can only be used with install_deps_req.sh"
8+
exit 1
9+
fi
10+
11+
# check if we have Ubuntu or not
12+
distro_str="$(cat /etc/*-release | grep -s DISTRIB_ID)"
13+
distro=$(echo $distro_str | cut -f2 -d'=')
14+
15+
if [ "$distro" != "Ubuntu" ]; then
16+
echo "ERROR: We need an Ubuntu system to use this script"
817
exit 1
918
fi
1019

@@ -46,9 +55,24 @@ make install
4655
# go back to original directory
4756
cd ../..
4857

58+
# get ubuntu version
59+
version_str="$(cat /etc/*-release | grep -s DISTRIB_RELEASE)"
60+
version=$(echo $version_str | cut -f2 -d'=')
61+
major_version=$(echo $version | cut -f1 -d'.')
62+
minor_version=$(echo $version | cut -f2 -d'.')
63+
64+
# if less than 14.04, exit
65+
if [ "$(($major_version))" -lt "14" ]; then
66+
echo "ERROR: We need Ubuntu >= 14.04 for this script to work"
67+
exit 1
68+
fi
69+
4970
# install DART dependencies
50-
sudo apt-add-repository ppa:libccd-debs/ppa -y
51-
sudo apt-add-repository ppa:fcl-debs/ppa -y
71+
# if we have less than 16.04, we need some extra stuff
72+
if [ "$(($major_version))" -lt "16" ]; then
73+
sudo apt-add-repository ppa:libccd-debs/ppa -y
74+
sudo apt-add-repository ppa:fcl-debs/ppa -y
75+
fi
5276
sudo apt-add-repository ppa:dartsim/ppa -y
5377
sudo apt-get -qq update
5478
sudo apt-get --yes --force-yes install build-essential pkg-config libassimp-dev libccd-dev libfcl-dev
@@ -65,9 +89,13 @@ cd ../../..
6589
# just as fail-safe
6690
sudo ldconfig
6791

92+
# configure paths to find DART related libraries properly
93+
source ./scripts/paths.sh
94+
6895
# install robot_dart
6996
cd deps/robot_dart
7097
./waf configure --dart=${cwd}/install --prefix=${cwd}/install
98+
./waf
7199
./waf install
72100
# go back to original directory
73-
cd ../..
101+
cd ../..

0 commit comments

Comments
 (0)