diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-10-28 13:24:50 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-10-28 13:24:50 -0200 |
commit | 917d3080944b3566e4d8ae315edc3fa8b213c8d2 (patch) | |
tree | cf77c7b7c9d4c3a88fae2949e46c9ef282071ae3 /templates | |
parent | 7ed8a5ecb7ec02d78449fcb10cd4698da4baed13 (diff) | |
download | puppet-drupal-917d3080944b3566e4d8ae315edc3fa8b213c8d2.tar.gz puppet-drupal-917d3080944b3566e4d8ae315edc3fa8b213c8d2.tar.bz2 |
Adding drupal_check_not_existing to drupal script
Diffstat (limited to 'templates')
-rw-r--r-- | templates/drupal.sh.erb | 11 |
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 |