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.
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