diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/drupal.sh.erb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb index 51a10d5..8e419ae 100644 --- a/templates/drupal.sh.erb +++ b/templates/drupal.sh.erb @@ -50,6 +50,14 @@ function drupal_check_not_existing { # Iterate through all drupal instances function drupal_iterate { + if [ -z "$1" ]; then + return + fi + + if [ "$SILENT" != "yes" ]; then + echo "Issuing $1 in all installed instances..." + fi + for version in $SERIES; do # Setup base folder base="$BASE/drupal-$version" @@ -69,8 +77,8 @@ function drupal_iterate { if [ -e "$drupal/settings.php" ]; then hash="`sha1sum $drupal/settings.php | cut -d ' ' -f 1`" # Process sites just once, avoiding symlinks - if echo $settings_hash | grep -q -v $hash; then - settings_hash="$settings_hash-$hash" + if echo $settings_hash | grep -q -v "$1:$hash"; then + settings_hash="$settings_hash-$1:$hash" if [ "$1" != "cron" ] && [ "$SILENT" != "yes" ]; then echo "Processing $drupal..." fi @@ -366,14 +374,14 @@ elif [ "$1" == "cron" ]; then drupal_iterate cron elif [ "$1" == "cron-update" ]; then SILENT="yes" - drupal_iterate pm-refresh $* &> /dev/null + drupal_iterate pm-refresh &> /dev/null drupal_iterate -y -p pm-update | grep -v -E 'Unknown|Up-to-date|Atualizado|Desconhecido|^Array$|^\($|^\)$|OK' elif [ "$1" == "deploy" ]; then shift drupal_deploy $* elif [ "$1" == "update" ]; then shift - drupal_iterate pm-refresh $* + drupal_iterate pm-refresh drupal_iterate pm-update $* # Update alone might not trigger updatedb in a farm for all instances. |