From: Silvio Rhatto Date: Wed, 9 Feb 2011 18:17:38 +0000 (-0200) Subject: Making drupal symlink if needed on deploy X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=c9873e148d603a19eb837701b30db5ec10b54022;p=puppet-drupal.git Making drupal symlink if needed on deploy --- 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.