summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-08-22 16:50:47 -0400
committerScott Moser <smoser@ubuntu.com>2014-08-22 16:50:47 -0400
commit9d8628772131bbe127bfefd6337cda34025723c8 (patch)
tree51b81b3b89a4ba09e3f11989027f0e2fe9cb75b2 /tools
parent31ef77ec5a948e02def84791084ccf37ac2b6180 (diff)
downloadvyos-cloud-init-9d8628772131bbe127bfefd6337cda34025723c8.tar.gz
vyos-cloud-init-9d8628772131bbe127bfefd6337cda34025723c8.zip
build-on-freebsd: minor cleanups/bikeshedding
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build-on-freebsd19
1 files changed, 16 insertions, 3 deletions
diff --git a/tools/build-on-freebsd b/tools/build-on-freebsd
index 6a3f38ec..66b95d68 100755
--- a/tools/build-on-freebsd
+++ b/tools/build-on-freebsd
@@ -3,8 +3,22 @@
# installing cloud-init. This script takes care of building and installing. It
# will optionally make a first run at the end.
+fail() { echo "FAILED:" "$@" 1>&2; exit 1; }
+
# Check dependencies:
-[ ! -f /tmp/c-i.dependencieschecked ] && pkg install python py27-cheetah py27-Jinja2 py27-prettytable py27-oauth py27-serial py27-configobj py27-yaml py27-argparse py27-requests py27-six py27-boto gpart sudo dmidecode
+depscheck=/tmp/c-i.dependencieschecked
+pkgs="
+ dmidecode
+ py27-argparse
+ py27-boto gpart sudo
+ py27-configobj py27-yaml
+ py27-Jinja2
+ py27-oauth py27-serial
+ py27-prettytable
+ py27-requests py27-six
+ python py27-cheetah
+"
+[ -f "$depschecked" ] || pkg install ${pkgs} || fail "install packages"
touch /tmp/c-i.dependencieschecked
# Required but unavailable port/pkg: py27-jsonpatch py27-jsonpointer
@@ -23,8 +37,7 @@ echo 'cloudinit_enable="YES"' >> /etc/rc.conf
echo "Installation completed."
-if [ "$1" = "run" ]
-then
+if [ "$1" = "run" ]; then
echo "Ok, now let's see if it works."
# Backup SSH keys