From 4c1bab861dba2f1d8bca76b5545729189a508f54 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 4 Mar 2014 12:05:56 -0300 Subject: Make deps target --- bin/dependencies | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 bin/dependencies (limited to 'bin/dependencies') diff --git a/bin/dependencies b/bin/dependencies new file mode 100755 index 0000000..148ab84 --- /dev/null +++ b/bin/dependencies @@ -0,0 +1,23 @@ +#!/bin/bash +# +# Simple shell provisioner for Vagrant instances. +# + +# Install a package, thanks to the Hydra Suite. +function provision_package { + if [ -z "$1" ]; then + return + fi + + dpkg -s $1 &> /dev/null + + if [ "$?" == "1" ]; then + echo "Installing package $1..." + DEBIAN_FRONTEND=noninteractive apt-get install $1 -y + fi +} + +# Ensure basic packages are installed. +for package in puppet ruby-hiera-puppet mr; do + provision_package $package +done -- cgit v1.2.3