etherpad-lite/bin/installOnWindows.bat

42 lines
1.1 KiB
Batchfile
Raw Normal View History

2012-06-28 15:58:39 +02:00
@echo off
:: Change directory to etherpad-lite root
cd /D "%~dp0\.."
2012-06-28 15:58:39 +02:00
:: Is node installed?
cmd /C node -e "" || ( echo "Please install node.js ( https://nodejs.org )" && exit /B 1 )
2012-06-28 15:58:39 +02:00
echo _
2013-02-10 16:19:28 +01:00
echo Ensure that all dependencies are up to date... If this is the first time you have run Etherpad please be patient.
mkdir node_modules
cd /D node_modules
mklink /D "ep_etherpad-lite" "..\src"
cd /D "ep_etherpad-lite"
cmd /C npm install --loglevel warn || exit /B 1
2017-08-07 17:15:02 +02:00
cd /D "%~dp0\.."
2012-06-28 15:58:39 +02:00
echo _
echo Copying custom templates...
set custom_dir=node_modules\ep_etherpad-lite\static\custom
FOR %%f IN (index pad timeslider) DO (
2012-06-30 20:20:05 +02:00
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 (
echo Can't find settings.json.
echo Copying settings.json.template...
cmd /C copy settings.json.template settings.json || exit /B 1
)
2012-06-28 15:58:39 +02:00
echo _
2017-08-07 17:15:02 +02:00
echo Installed Etherpad! To run Etherpad type start.bat