aboutsummaryrefslogtreecommitdiff
path: root/bin/dependencies
diff options
context:
space:
mode:
Diffstat (limited to 'bin/dependencies')
-rwxr-xr-xbin/dependencies8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/dependencies b/bin/dependencies
index c410852..7fda4fb 100755
--- a/bin/dependencies
+++ b/bin/dependencies
@@ -13,10 +13,16 @@ function provision_package {
if [ "$?" == "1" ]; then
echo "Installing package $1..."
- DEBIAN_FRONTEND=noninteractive apt-get install $1 -y
+ DEBIAN_FRONTEND=noninteractive $sudo apt-get install $1 -y
fi
}
+# Set sudo config
+local sudo device rsync
+if [ "`whoami`" != 'root' ]; then
+ sudo="sudo"
+fi
+
# Ensure basic packages are installed.
for package in puppet ruby-hiera-puppet mr whois; do
provision_package $package