From 3d397b1bc25c6a1fa75bccde08b96e534d36ce41 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 29 Jun 2012 12:41:50 +0200 Subject: [PATCH] Fix windows install script * would overwrite settings.json * didn't correctly copy custom templates * cleans var/minified* now --- bin/installOnWindows.bat | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/bin/installOnWindows.bat b/bin/installOnWindows.bat index b6f699de8..0e3e20996 100644 --- a/bin/installOnWindows.bat +++ b/bin/installOnWindows.bat @@ -6,10 +6,6 @@ set JQUERY_VERSION=1.7 cd bin cd .. -echo _ -echo Setting up settings.json... -copy settings.json.template_windows settings.json - echo _ echo Updating node... curl -lo bin\node.exe http://nodejs.org/dist/v%NODE_VERSION%/node.exe @@ -23,13 +19,20 @@ echo Updating jquery... curl -lo "node_modules\ep_etherpad-lite\static\js\jquery.min.js" "http://code.jquery.com/jquery-%JQUERY_VERSION%.min.js" echo _ -echo Some other stuff... -copy node_modules\ep_etherpad-lite\static\custom\js.template node_modules\ep_etherpad-lite\static\custom\index.template -copy node_modules\ep_etherpad-lite\static\custom\js.template node_modules\ep_etherpad-lite\static\custom\pad.template -copy node_modules\ep_etherpad-lite\static\custom\js.template node_modules\ep_etherpad-lite\static\custom\timeslider.template -copy node_modules\ep_etherpad-lite\static\custom\css.template node_modules\ep_etherpad-lite\static\custom\index.template -copy node_modules\ep_etherpad-lite\static\custom\css.template node_modules\ep_etherpad-lite\static\custom\pad.template -copy node_modules\ep_etherpad-lite\static\custom\css.template node_modules\ep_etherpad-lite\static\custom\timeslider.template +echo Copying custom templates... +set custom_dir=node_modules\ep_etherpad-lite\static\custom +FOR %%f IN (index pad timeslider) DO ( + if NOT EXIST %custom_dir%\%%f.js copy %custom_dir%\js.template %custom_dir%\%%f.js + if NOT EXIST %custom_dir%\%%f.css copy %custom_dir%\css.template %custom_dir%\%%f.css +) + +echo _ +echo Clearing cache. +del /S var\minified* + +echo _ +echo Setting up settings.json... +IF NOT EXIST settings.json copy settings.json.template_windows settings.json echo _ echo Installed Etherpad-lite! \ No newline at end of file