diff options
Diffstat (limited to 'bin/dependencies')
| -rwxr-xr-x | bin/dependencies | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/bin/dependencies b/bin/dependencies deleted file mode 100755 index 4330730..0000000 --- a/bin/dependencies +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# -# Puppet bootstrap dependencies. -# - -# Parameters -BASENAME="`basename $0`" -DEPLOY_DEPENDENCIES="rsync puppet-common hiera-eyaml" -DEVELOP_DEPENDENCIES="git mr whois hiera-eyaml" - -# Additional wheezy dependencies if not using puppet-common from wheezy-backports -#if [ "`head -c 1 /etc/debian_version`" == '7' ]; then -# DEPLOY_DEPENDENCIES="$DEPLOY_DEPENDENCIES ruby-hiera-puppet" -#fi - -# Set sudo config -if [ "`whoami`" != 'root' ]; then - SUDO="sudo" - - if ! sudo -n true; then - echo "Please set passwordless sudo." - exit 1 - fi -fi - -# 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 $SUDO apt-get install $1 -y - fi -} - -# Ensure basic packages are installed. -if [ "$BASENAME" == "dependencies" ]; then - for package in $DEVELOP_DEPENDENCIES; do - provision_package $package - done -fi |
