From 917d3080944b3566e4d8ae315edc3fa8b213c8d2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 28 Oct 2011 13:24:50 -0200 Subject: Adding drupal_check_not_existing to drupal script --- templates/drupal.sh.erb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'templates') 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 " @@ -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 -- cgit v1.2.3