You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by be...@apache.org on 2017/06/13 19:51:30 UTC

[incubator-openwhisk] branch master updated: update ubuntu scripts to fail on first error (#2362)

This is an automated email from the ASF dual-hosted git repository.

berstler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 3c250ad  update ubuntu scripts to fail on first error (#2362)
3c250ad is described below

commit 3c250ad329ab78f62194f89e3999b9fbaa35d2e3
Author: Carlos Santana <cs...@gmail.com>
AuthorDate: Tue Jun 13 15:51:28 2017 -0400

    update ubuntu scripts to fail on first error (#2362)
---
 tools/ubuntu-setup/all.sh     | 39 ++++++++-------------------------------
 tools/ubuntu-setup/ansible.sh |  9 ++++++---
 tools/ubuntu-setup/docker.sh  |  4 ++--
 tools/ubuntu-setup/java8.sh   |  4 ++++
 tools/ubuntu-setup/misc.sh    |  4 ++++
 tools/ubuntu-setup/pip.sh     |  4 ++++
 tools/ubuntu-setup/scala.sh   |  4 ++++
 7 files changed, 32 insertions(+), 36 deletions(-)

diff --git a/tools/ubuntu-setup/all.sh b/tools/ubuntu-setup/all.sh
index a2901aa..39c19f6 100755
--- a/tools/ubuntu-setup/all.sh
+++ b/tools/ubuntu-setup/all.sh
@@ -1,45 +1,22 @@
 #!/bin/bash
-SOURCE="${BASH_SOURCE[0]}"
-SCRIPTDIR="$( dirname "$SOURCE" )"
-
-ERRORS=0
-
-
-function install() {
-    "$1/$2" &
-    pid=$!
-    wait $pid
-    status=$?
-    printf "$pid finished with status $status \n\n"
-    if [ $status -ne 0 ]
-    then
-        let ERRORS=ERRORS+1
-    fi
-}
+set -e
+set -x
 
 echo "*** installing basics"
-install "$SCRIPTDIR" misc.sh
-
+"$SCRIPTDIR/misc.sh"
 
 echo "*** installing python dependences"
-install "$SCRIPTDIR" pip.sh
-
+"$SCRIPTDIR/pip.sh"
 
 echo "*** installing java"
-install "$SCRIPTDIR" java8.sh
-
+"$SCRIPTDIR/java8.sh"
 
 echo "*** install scala"
-install "$SCRIPTDIR" scala.sh
-
+"$SCRIPTDIR/scala.sh"
 
 echo "*** installing docker"
-install "$SCRIPTDIR" docker.sh
-
+"$SCRIPTDIR/docker.sh"
 
 echo "*** installing ansible"
-install "$SCRIPTDIR" ansible.sh
-
+"$SCRIPTDIR/ansible.sh"
 
-echo install all with total errors number $ERRORS
-exit $ERRORS
diff --git a/tools/ubuntu-setup/ansible.sh b/tools/ubuntu-setup/ansible.sh
index 9b292d1..b1588bf 100755
--- a/tools/ubuntu-setup/ansible.sh
+++ b/tools/ubuntu-setup/ansible.sh
@@ -1,11 +1,14 @@
+#!/bin/bash
+set -e
+set -x
+
 sudo apt-get install -y software-properties-common
 sudo apt-add-repository -y ppa:ansible/ansible
 sudo apt-get update
-sudo apt-get install python-dev -y
-sudo apt-get install libffi-dev -y
+sudo apt-get install -y python-dev libffi-dev libssl-dev
 sudo pip install markupsafe
 sudo pip install ansible==2.3.0.0
 sudo pip install docker==2.2.1
 
 ansible --version
-ansible-playbook --version
+ansible-playbook --version
\ No newline at end of file
diff --git a/tools/ubuntu-setup/docker.sh b/tools/ubuntu-setup/docker.sh
index 72ff501..08f53bb 100755
--- a/tools/ubuntu-setup/docker.sh
+++ b/tools/ubuntu-setup/docker.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
-
-set -ex
+set -e
+set -x
 
 sudo apt-get -y install apt-transport-https ca-certificates
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
diff --git a/tools/ubuntu-setup/java8.sh b/tools/ubuntu-setup/java8.sh
index 7676644..7e2c0bf 100755
--- a/tools/ubuntu-setup/java8.sh
+++ b/tools/ubuntu-setup/java8.sh
@@ -1,3 +1,7 @@
+#!/bin/bash
+set -e
+set -x
+
 sudo apt-get install -y software-properties-common
 sudo add-apt-repository -y ppa:webupd8team/java
 sudo apt-get update -y
diff --git a/tools/ubuntu-setup/misc.sh b/tools/ubuntu-setup/misc.sh
index 9c714fe..7d36b2a 100755
--- a/tools/ubuntu-setup/misc.sh
+++ b/tools/ubuntu-setup/misc.sh
@@ -1,3 +1,7 @@
+#!/bin/bash
+set -e
+set -x
+
 export DEBIAN_FRONTEND=noninteractive
 
 echo "Etc/UTC" | sudo tee /etc/timezone
diff --git a/tools/ubuntu-setup/pip.sh b/tools/ubuntu-setup/pip.sh
index d28d238..e73618a 100755
--- a/tools/ubuntu-setup/pip.sh
+++ b/tools/ubuntu-setup/pip.sh
@@ -1,3 +1,7 @@
+#!/bin/bash
+set -e
+set -x
+
 sudo apt-get install -y python-pip
 sudo pip install jsonschema
 sudo pip install argcomplete
diff --git a/tools/ubuntu-setup/scala.sh b/tools/ubuntu-setup/scala.sh
index af7133f..d123b0b 100755
--- a/tools/ubuntu-setup/scala.sh
+++ b/tools/ubuntu-setup/scala.sh
@@ -1,3 +1,7 @@
+#!/bin/bash
+set -e
+set -x
+
 wget www.scala-lang.org/files/archive/scala-2.11.6.deb -O /tmp/scala-2.11.6.deb
 sudo dpkg -i /tmp/scala-2.11.6.deb
 sudo apt-get update

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].