From c9873e148d603a19eb837701b30db5ec10b54022 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 9 Feb 2011 16:17:38 -0200 Subject: Making drupal symlink if needed on deploy --- templates/drupal.sh.erb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'templates/drupal.sh.erb') 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. -- cgit v1.2.3