From 46734d87d868467bec20d8f58450d19217c4d8f4 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 29 Feb 2012 08:26:01 -0300 Subject: Process sites just once using a hash on drupal script --- templates/drupal.sh.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb index d95844d..cfe48c0 100644 --- a/templates/drupal.sh.erb +++ b/templates/drupal.sh.erb @@ -65,8 +65,10 @@ function drupal_iterate { # Issue updates for drupal in $drupals; do if [ -e "$drupal/settings.php" ]; then - # Ignore symlinks so sites are updated just once - if [ ! -h "$drupal" ] || [ ! -h "`readlink $drupal`" ]; then + hash="sha1sum $drupal/settings.php" + # Process sites just once, avoiding symlinks + if echo $settings_hash | grep -q $hash; then + settings_hash="$settings_hash-$hash" if [ "$1" != "cron" ]; then echo "Processing $drupal..." fi -- cgit v1.2.3