scripts/install_xtuple: check for sudo and install other key tools using apt
authorDaniel Pocock <daniel@pocock.pro>
Sat, 3 May 2014 13:43:59 +0000 (15:43 +0200)
committerDaniel Pocock <daniel@pocock.pro>
Sat, 3 May 2014 13:43:59 +0000 (15:43 +0200)
scripts/install_xtuple.sh

index 90dc618..0ee4760 100644 (file)
@@ -2,8 +2,26 @@
 
 set -e
 
+echo -n "Checking for sudo..."
+if ! which sudo ;
+then
+  echo "Please install sudo and grant yourself access to sudo:"
+  echo
+  echo "   # apt-get install sudo"
+  echo "   # addgroup $USER sudo"
+  echo
+  exit 1
+fi
+
 alias sudo='sudo env PATH=$PATH $@'
 
+# Make sure we have all the essential tools we need
+sudo apt-get -q -y install \
+  git \
+  curl \
+  python-software-properties \
+  software-properties-common
+
 NODE_VERSION=0.8.26
 
 RUN_DIR=$(pwd)