]> gitweb.fluxo.info Git - puppet-drupal.git/commitdiff
Hardlink copy
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 17 Jun 2020 19:49:13 +0000 (16:49 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 17 Jun 2020 19:49:13 +0000 (16:49 -0300)
files/drupal

index 4a51fda23b3f9bc3b950fabcb081229d699eaa38..e43fd49b04db9c25308685e379bbd61412ac0da4 100755 (executable)
@@ -42,7 +42,7 @@ function drupal_check_existing {
       echo "Folder $BASE/drupal-$1 already exists, skipping"
     fi
     exit
-  fi  
+  fi
 }
 
 # Check for non existing installations
@@ -52,7 +52,7 @@ function drupal_check_not_existing {
       echo "Folder $BASE/drupal-$1 does not exist, skipping"
     fi
     exit 1
-  fi  
+  fi
 }
 
 # Iterate through all drupal instances
@@ -85,7 +85,7 @@ function drupal_iterate {
     cd $base/sites
     drupals="`ls -1 -I default -I all -I example.sites.php -I '*.onion' | grep "\." | xargs`"
     drupals="$drupals `ls -1 | grep '.onion$' | xargs`"
-  
+
     # Issue updates
     for drupal in $drupals; do
       if [ -e "$drupal/settings.php" ]; then
@@ -262,9 +262,9 @@ function drupal_upgrade {
 
   drupal_check_existing $new
   drupal_check_not_existing $old
-  
+
   cd $BASE
-  
+
   # Deploy a fresh drupal tree
   drupal_download $new --upgrade
 
@@ -274,7 +274,7 @@ function drupal_upgrade {
   # Copy files
   for file in sites; do
     if [ ! -h "../drupal-$old/$file" ]; then
-      cp -a ../drupal-$old/$file . &> /dev/null
+      cp -alf ../drupal-$old/$file . &> /dev/null
     else
       # Symlink handling
       ln -sf $file `readlink ../drupal-$old/$file`
@@ -289,7 +289,7 @@ function drupal_upgrade {
       cp -Rp ../drupal-$old/$extra_folder .
     fi
   done
-  
+
   # Copy installation profiles
   rsync -av --exclude=default ../drupal-$old/profiles/ profiles/