]> gitweb.fluxo.info Git - puppet-drupal.git/commitdiff
Using confirm instead of pipe
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 15 Nov 2012 15:20:57 +0000 (13:20 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 15 Nov 2012 15:20:57 +0000 (13:20 -0200)
templates/drupal.sh.erb

index 046c58ca9ba1585af2e69e1f378f812f31209152..04bce658e0e1bda4ee3a7854ee146e12f4790fd1 100644 (file)
@@ -84,7 +84,8 @@ function drupal_iterate {
           fi
 
           if [ "$1" == "update" ] || [ "$1" == "cron-update" ]; then
-            drupal_update $1 $drupal
+            shift
+            drupal_update $1 $drupal $*
           else
             drush -l $drupal $*
           fi
@@ -106,12 +107,12 @@ function drupal_iterate {
 function drupal_update {
   local method="$1"
   local instance="$2"
-  local pipe
+  local confirm
   local line
   shift 2
 
   if [ "$method" == "cron-update" ]; then
-    pipe="--pipe"
+    confirm="-y"
   fi
 
   # See https://drupal.org/node/823146#comment-3319070
@@ -122,7 +123,7 @@ function drupal_update {
     if [ "$code" == "drupal" ]; then
       echo "Core update available: $line"
     else
-      drush -l $instance up -y -u 1 $pipe $* $code
+      drush -l $instance up -u 1 $confirm $* $code
     fi
   done
 }