]> gitweb.fluxo.info Git - puppet-drupal.git/commitdiff
Adding 'make' drupal subcommand
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 27 Nov 2010 19:31:41 +0000 (17:31 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 27 Nov 2010 19:31:41 +0000 (17:31 -0200)
templates/drupal.sh.erb

index 3268413d26545ef98e835f6cdb4991717593ba0f..b1412edf3a35f6737cf58d7be367b56532beb1b5 100644 (file)
@@ -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