diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-03-05 23:05:04 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-03-05 23:05:04 -0300 |
commit | 4c5f1171c1423002bd95f790421f895939cfa472 (patch) | |
tree | f00585b0801bd485ed86816e7f677c33d44a77d9 /bin | |
parent | 73d6006ff57a1c3eea6732bb40cb945d68d90040 (diff) | |
download | puppet-bootstrap-4c5f1171c1423002bd95f790421f895939cfa472.tar.gz puppet-bootstrap-4c5f1171c1423002bd95f790421f895939cfa472.tar.bz2 |
Development dependencies
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/dependencies | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/bin/dependencies b/bin/dependencies index 94d3765..37dabab 100755 --- a/bin/dependencies +++ b/bin/dependencies @@ -4,14 +4,21 @@ # # Parameters -DEPENDENCIES="puppet-common git mr whois" +BASENAME="`basename $0`" +DEPENDENCIES="puppet-common" DEPLOY_DEPENDENCIES="ruby-sqlite3 ruby-activerecord" +DEVELOP_DEPENDENCIES="git mr whois" # Additional non-wheezy package if [ "`head -c 1 /etc/debian_version`" != '7' ]; then DEPLOY_DEPENDENCIES="$DEPLOY_DEPENDENCIES ruby-activerecord-deprecated-finders" fi +# Set sudo config +if [ "`whoami`" != 'root' ]; then + SUDO="sudo" +fi + # Install a package, thanks to the Hydra Suite. function provision_package { if [ -z "$1" ]; then @@ -26,12 +33,9 @@ function provision_package { fi } -# Set sudo config -if [ "`whoami`" != 'root' ]; then - SUDO="sudo" -fi - # Ensure basic packages are installed. -for package in $DEPENDENCIES; do - provision_package $package -done +if [ "$BASENAME" == "dependencies" ]; then + for package in $DEVELOP_DEPENDENCIES; do + provision_package $package + done +fi |