aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/drupal.sh.erb11
1 files changed, 10 insertions, 1 deletions
diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb
index f2596ab..cd633c8 100644
--- a/templates/drupal.sh.erb
+++ b/templates/drupal.sh.erb
@@ -162,7 +162,16 @@ function drupal_upgrade {
cd $BASE/drupal-$new
# Copy files
- cp -Rp ../drupal-$old/{.htaccess,favicon.ico,files/,sites/} . &> /dev/null
+ for file in .htaccess favicon.ico files sites; do
+ if [ ! -h "../drupal-$old/$file" ]; then
+ cp -a ../drupal-$old/$file . &> /dev/null
+ else
+ # Symlink handling
+ ln -sf $file `readlink ../drupal-$old/$file`
+ fi
+ done
+
+ # Extra folder
for extra_folder in $extra_folders; do
if [ -d ../drupal-$old/$extra_folder ]; then
cp -Rp ../drupal-$old/$extra_folder .