@@ -4,7 +4,16 @@ OS=$(uname)
44echo " Detected OS: $OS "
55
66if [ $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
918fi
1019
@@ -46,9 +55,24 @@ make install
4655# go back to original directory
4756cd ../..
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
5276sudo apt-add-repository ppa:dartsim/ppa -y
5377sudo apt-get -qq update
5478sudo 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
6690sudo ldconfig
6791
92+ # configure paths to find DART related libraries properly
93+ source ./scripts/paths.sh
94+
6895# install robot_dart
6996cd 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