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 7963dcf..8ac6b9e 100644
--- a/templates/drupal.sh.erb
+++ b/templates/drupal.sh.erb
@@ -40,6 +40,14 @@ function drupal_check_existing {
fi
}
+# Check for non existing installations
+function drupal_check_not_existing {
+ if [ ! -e "$BASE/drupal-$1" ]; then
+ echo "Folder $BASE/drupal-$1 does not exist, skipping"
+ exit 1
+ fi
+}
+
# Iterate through all drupal instances
function drupal_iterate {
for version in $SERIES; do
@@ -104,7 +112,7 @@ function drupal_deploy {
fi
}
-# Upgrade a drupal instance using upstream source.
+# Upgrade a drupal instance using upstream source
function drupal_upgrade {
if [ "$#" != "2" ]; then
echo "Usage: `basename $0` upgrade <old_version> <new_version>"
@@ -124,6 +132,7 @@ function drupal_upgrade {
fi
drupal_check_existing $new
+ drupal_check_not_existing $old
# Set drupal series
if [ "$new_major" == "4" ]; then