diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/drupal.sh.erb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb index 9dbb850..358d07c 100644 --- a/templates/drupal.sh.erb +++ b/templates/drupal.sh.erb @@ -68,7 +68,11 @@ function drupal_deploy { wget http://ftp.drupal.org/files/projects/drupal-$new.tar.gz tar zxvf drupal-$new.tar.gz && rm drupal-$new.tar.gz chown -R root.root drupal-$new/ - cd drupal-$new && rm -rf sites + + # Upgrade mode, erase sites folder as the previous should be copied. + if [ "$2" == "--upgrade" ]; then + cd drupal-$new && rm -rf sites + fi } # Upgrade a drupal instance using upstream source. @@ -110,7 +114,7 @@ function drupal_upgrade { cd $BASE # Deploy a fresh drupal tree - drupal_deploy $new + drupal_deploy $new --upgrade # Ensure we're in the new drupal folder cd $BASE/drupal-$new |