From: drebs Date: Mon, 15 Feb 2010 00:51:54 +0000 (-0200) Subject: Fixing some paths on wiki upgrade. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=0c10b6450c024c1a765eb9c882c359506b396454;p=puppet-pmwiki.git Fixing some paths on wiki upgrade. --- diff --git a/templates/pmwiki.sh.erb b/templates/pmwiki.sh.erb index c9298ca..e22870b 100644 --- a/templates/pmwiki.sh.erb +++ b/templates/pmwiki.sh.erb @@ -8,7 +8,7 @@ BASE="<%= apache_www_folder %>" # Check for existing installations function pmwiki_check_existing { if [ -e "$BASE/pmwiki-$1" ]; then - echo "Folder $BASE/pmwiki-$1 already exist, skipping" + echo "Folder $BASE/pmwiki-$1 already exists, skipping." exit 1 fi } @@ -54,12 +54,9 @@ function pmwiki_upgrade { pmwiki_deploy $new # Copy files - for file in .htaccess index.php farmconfig.php local config.php; do + for file in .htaccess index.php farmconfig.php local config.php wiki.d; do if [ -f "pmwiki-$old/$file" ]; then - cp pmwiki-$old/$file pmwiki-$new/ - fi - if [ -f "pmwiki-$old/local/$file" ]; then - cp pmwiki-$old/local/$file pmwiki-$new/local/ + cp -a pmwiki-$old/$file pmwiki-$new/ fi done for extra_folder in $extra_folders; do