diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-06-17 16:49:13 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-06-17 16:49:13 -0300 |
commit | 38b5ec3e760701866b7baa498a1df0c43b36e684 (patch) | |
tree | 1e69b7d2845e0e2a5a529cb0beff49decbee5a0b /files | |
parent | fc8c985a789bb8b028facf6be92bb4eae26aece4 (diff) | |
download | puppet-drupal-38b5ec3e760701866b7baa498a1df0c43b36e684.tar.gz puppet-drupal-38b5ec3e760701866b7baa498a1df0c43b36e684.tar.bz2 |
Hardlink copy
Diffstat (limited to 'files')
-rwxr-xr-x | files/drupal | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/files/drupal b/files/drupal index 4a51fda..e43fd49 100755 --- a/files/drupal +++ b/files/drupal @@ -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/ |