From 538f52d194bfbdf58064c02eaafbcf76d681ecd3 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Tue, 21 Oct 2014 16:04:45 -0200 Subject: [PATCH] vagrant provisioning: improve debuging ability --- vagrant/bootstrap.sh | 4 ++-- vagrant/centos.sh | 2 ++ vagrant/provision.sh | 4 ++++ vagrant/ubuntu.sh | 3 +-- 4 files changed, 9 insertions(+), 4 deletions(-) mode change 100644 => 100755 vagrant/bootstrap.sh mode change 100644 => 100755 vagrant/centos.sh mode change 100644 => 100755 vagrant/provision.sh mode change 100644 => 100755 vagrant/ubuntu.sh diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh old mode 100644 new mode 100755 index 0425166..808c18c --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -11,8 +11,8 @@ done # very simple OS detection if [ -x /usr/bin/apt-get ]; then - exec sh $basedir/vagrant/ubuntu.sh + exec $basedir/vagrant/ubuntu.sh fi if [ -x /usr/bin/yum ]; then - exec sh $basedir/vagrant/centos.sh + exec $basedir/vagrant/centos.sh fi diff --git a/vagrant/centos.sh b/vagrant/centos.sh old mode 100644 new mode 100755 index 81a6e90..4961a93 --- a/vagrant/centos.sh +++ b/vagrant/centos.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -ex + ### Disable annoying plugin sed -i'' s/enabled=1/enabled=0/g /etc/yum/pluginconf.d/fastestmirror.conf diff --git a/vagrant/provision.sh b/vagrant/provision.sh old mode 100644 new mode 100755 index 4fe097f..7c14877 --- a/vagrant/provision.sh +++ b/vagrant/provision.sh @@ -1,7 +1,10 @@ #!/bin/bash +set -x + export VIRTUALENVWRAPPER_PYTHON="/usr/bin/python2.7" +set +e if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then source /usr/local/bin/virtualenvwrapper.sh else @@ -13,6 +16,7 @@ if [ ! -d /home/vagrant/.virtualenvs/colab ]; then fi workon colab +set -e for dir in /vagrant/colab /vagrant; do if [ -f $dir/setup.py ]; then diff --git a/vagrant/ubuntu.sh b/vagrant/ubuntu.sh old mode 100644 new mode 100755 index 4031212..54a9e10 --- a/vagrant/ubuntu.sh +++ b/vagrant/ubuntu.sh @@ -1,7 +1,6 @@ #!/bin/bash -UBUNTU=$(lsb_release -sc) - +set -ex ### Install dependencies apt-get update -- libgit2 0.21.2