Code Review
/
icn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Fix version of box used in Vagrantfile"
[icn.git]
/
tools
/
cloud-configs.sh
diff --git
a/tools/cloud-configs.sh
b/tools/cloud-configs.sh
index
98ffcd4
..
94857b8
100644
(file)
--- a/
tools/cloud-configs.sh
+++ b/
tools/cloud-configs.sh
@@
-1,4
+1,5
@@
-!/bin/bash
+#!/usr/bin/env bash
+set -eu -o pipefail
# This script is called by cloud-init on worker nodes
# What does this script do:
# This script is called by cloud-init on worker nodes
# What does this script do:
@@
-15,20
+16,20
@@
for module in $MODULES_LIST; do
filename=$module-$VER.tar.gz
if [ ! -e $filename ]; then
if [ ! -e $SHARE_FOLDER/$filename ]; then
filename=$module-$VER.tar.gz
if [ ! -e $filename ]; then
if [ ! -e $SHARE_FOLDER/$filename ]; then
-
echo "Cannot install module $module ..."
-
continue
-
else
+ echo "Cannot install module $module ..."
+ continue
+ else
cp $SHARE_FOLDER/$filename .
fi
fi
tar xvzf $filename
cp $SHARE_FOLDER/$filename .
fi
fi
tar xvzf $filename
- if [ -d $module ]; then
+ if [ -d $module ]; then
echo "Installing module $module ..."
echo "Installing module $module ..."
- pushd $module
+
pushd $module
bash ./install.sh
popd
bash ./install.sh
popd
-
rm -rf $module
+ rm -rf $module
fi
fi
-done
+done