aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-02-09 16:17:38 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-02-09 16:17:38 -0200
commitc9873e148d603a19eb837701b30db5ec10b54022 (patch)
treeb1934d4e9c77d38bbbcf7a7387c45483e0c0dedb
parent5ab85793ba13269ebcc802eed6afcdbe2bd44270 (diff)
downloadpuppet-drupal-c9873e148d603a19eb837701b30db5ec10b54022.tar.gz
puppet-drupal-c9873e148d603a19eb837701b30db5ec10b54022.tar.bz2
Making drupal symlink if needed on deploy
-rw-r--r--templates/drupal.sh.erb6
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/drupal.sh.erb b/templates/drupal.sh.erb
index 358d07c..1a069f3 100644
--- a/templates/drupal.sh.erb
+++ b/templates/drupal.sh.erb
@@ -61,6 +61,7 @@ function drupal_deploy {
# Setup
new="$1"
+ drupal_series="`drupal_get_major $new`"
cd $BASE
drupal_check_existing $new
@@ -73,6 +74,11 @@ function drupal_deploy {
if [ "$2" == "--upgrade" ]; then
cd drupal-$new && rm -rf sites
fi
+
+ # Make symlink if needed.
+ if [ ! -e "$BASE/drupal-$drupal_series" ]; then
+ ( cd $BASE && ln -s drupal-$new drupal-$drupal_series )
+ fi
}
# Upgrade a drupal instance using upstream source.