]> gitweb.fluxo.info Git - puppet-drupal.git/commitdiff
Minor fixes at template script
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 30 Dec 2009 16:32:45 +0000 (14:32 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 30 Dec 2009 16:32:45 +0000 (14:32 -0200)
templates/drupal.sh.erb

index 5b641c0d9ffb03da8ddf09db12238dd9f22ff377..74a670a3622a58b93ddfbb0557a8a24e13b3ce40 100644 (file)
@@ -45,7 +45,7 @@ function drupal_update {
     base="$BASE/drupal-$version"
 
     if [ ! -d "$base/sites" ]; then
-      break
+      continue
     fi
 
     # Setup site folders
@@ -55,15 +55,19 @@ function drupal_update {
     # Issue updates
     for drupal in $drupals; do
       # Ignore symlinks so sites are updated just once
-      if [ ! -h $drupal ]; then
+      if [ ! -h "$drupal" ]; then
         echo "Processing $drupal..."
         drush -l $drupal update
       fi
     done
   
     # Fix permissions
-    chown -R root.root $base/sites/all/modules
-    chown -R root.root $base/sites/all/themes
+    if [ -e "$base/sites/all/modules" ]; then
+      chown -R root.root $base/sites/all/modules
+    fi
+    if [ -e "$base/sites/all/themes" ]; then
+      chown -R root.root $base/sites/all/themes
+    fi
   done
 }