]> gitweb.fluxo.info Git - puppet-drupal.git/commitdiff
Making drupal symlink if needed on deploy
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 9 Feb 2011 18:17:38 +0000 (16:17 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 9 Feb 2011 18:17:38 +0000 (16:17 -0200)
templates/drupal.sh.erb

index 358d07c8e04522b512b887391fb62c7445e5ee82..1a069f3804799a73c9e96587d581cdcad737e8f7 100644 (file)
@@ -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.