aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-11-27 17:31:41 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-11-27 17:31:41 -0200
commit3deb2f2bd3ceae2e9fc116a9d9b1d4919ff3bdba (patch)
tree4504dfde097b3fc7f66b8b8abc69ad4254d0a4c4
parent31111a0fd8ae06861100462080b763ed0f94ce08 (diff)
downloadpuppet-drupal-3deb2f2bd3ceae2e9fc116a9d9b1d4919ff3bdba.tar.gz
puppet-drupal-3deb2f2bd3ceae2e9fc116a9d9b1d4919ff3bdba.tar.bz2
Adding 'make' drupal subcommand
-rw-r--r--templates/drupal.sh.erb23
1 files changed, 23 insertions, 0 deletions
diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb
index 3268413..b1412ed 100644
--- a/templates/drupal.sh.erb
+++ b/templates/drupal.sh.erb
@@ -152,6 +152,26 @@ function drupal_upgrade {
echo "Check procedure and remove drupal-$old once you make sure that everything is fine."
}
+# Run a drupal makefile
+function drupal_make {
+ if [ -z "$1" ]; then
+ echo "Usage: `basename $0` make <series>"
+ exit 1
+ fi
+
+ series="$1"
+ base="$BASE/drupal-$series"
+ makefile="/usr/local/share/drupal/drupal$series.make"
+
+ if [ -e "$makefile" ]; then
+ drush dl drush_make
+ ( cd $base && drush make -y --no-core $makefile )
+ else
+ echo "Makefile not found: $makefile"
+ exit 1
+ fi
+}
+
# Main procedure
if [ -z "$1" ]; then
echo "Usage: `basename $0` <cron|deploy|update|updatedb|upgrade|run> [arguments]"
@@ -177,6 +197,9 @@ elif [ "$1" == "upgrade" ]; then
elif [ "$1" == "run" ]; then
shift
drupal_iterate $*
+elif [ "$1" == "make" ]; then
+ shift
+ drupal_make $*
else
echo "No action $1"
exit 1