aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-05 23:05:04 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-05 23:05:04 -0300
commit4c5f1171c1423002bd95f790421f895939cfa472 (patch)
treef00585b0801bd485ed86816e7f677c33d44a77d9
parent73d6006ff57a1c3eea6732bb40cb945d68d90040 (diff)
downloadpuppet-bootstrap-4c5f1171c1423002bd95f790421f895939cfa472.tar.gz
puppet-bootstrap-4c5f1171c1423002bd95f790421f895939cfa472.tar.bz2
Development dependencies
-rwxr-xr-xbin/dependencies22
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