aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-11-15 11:42:43 -0200
committerSilvio Rhatto <rhatto@riseup.net>2012-11-15 11:42:43 -0200
commita78fa410bf3c77cd0478abe3620aaf867c13b55a (patch)
tree47f53b9d3f2df6fb75996db48b90121a41929273
parent814056989dc2edcb5f8e964cf787dbb8ad0988db (diff)
downloadpuppet-drupal-a78fa410bf3c77cd0478abe3620aaf867c13b55a.tar.gz
puppet-drupal-a78fa410bf3c77cd0478abe3620aaf867c13b55a.tar.bz2
Enhancing drupal_update
-rw-r--r--templates/drupal.sh.erb14
1 files changed, 11 insertions, 3 deletions
diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb
index 06754c8..990e43b 100644
--- a/templates/drupal.sh.erb
+++ b/templates/drupal.sh.erb
@@ -107,15 +107,23 @@ function drupal_update {
local method="$1"
local instance="$2"
local pipe
+ local line
if [ "$method" == "" ]; then
pipe="--pipe"
fi
# See https://drupal.org/node/823146#comment-3319070
- # Also, avoid automated core updates
- drush -l $instance up -u 1 --pipe | grep -v -E '^drupal|Unknown|Up-to-date|Atualizado|Desconhecido|^Array$|^\($|^\)$|OK' \
- | cut -d " " -f1 | xargs drush up -u 1 -y $pipe
+ drush -l $instance up -u 1 --pipe | \
+ grep -v -E 'Unknown|Up-to-date|Atualizado|Desconhecido|^Array$|^\($|^\)$|OK' | while read line ; do
+ # Avoid automated core updates
+ code="`echo $line | cut -d " " -f1`"
+ if [ "$code" == "drupal" ]; then
+ echo "Core update available: $line"
+ else
+ drush -l $instance up -y -u 1 $pipe $code
+ fi
+ done
}
# Deploy a fresh drupal tree