Merge pull request #914 from marcelklehr/feature/simplify-windows-install
Simplify windows install
This commit is contained in:
commit
ec130e91c0
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
NODE_VERSION="0.6.5"
|
NODE_VERSION="0.8.4"
|
||||||
|
|
||||||
#Move to the folder where ep-lite is installed
|
#Move to the folder where ep-lite is installed
|
||||||
cd `dirname $0`
|
cd `dirname $0`
|
||||||
|
@ -50,7 +50,7 @@ mv node_modules_resolved node_modules
|
||||||
|
|
||||||
echo "download windows node..."
|
echo "download windows node..."
|
||||||
cd bin
|
cd bin
|
||||||
wget "http://nodejs.org/dist/v$NODE_VERSION/node.exe" -O node.exe
|
wget "http://nodejs.org/dist/v$NODE_VERSION/node.exe" -O ../node.exe
|
||||||
|
|
||||||
echo "create the zip..."
|
echo "create the zip..."
|
||||||
cd /tmp
|
cd /tmp
|
||||||
|
|
|
@ -1,22 +1,19 @@
|
||||||
@echo off
|
@echo off
|
||||||
set NODE_VERSION=0.8.1
|
|
||||||
set JQUERY_VERSION=1.7
|
|
||||||
|
|
||||||
:: change directory to etherpad-lite root
|
:: change directory to etherpad-lite root
|
||||||
cd bin
|
cd /D "%~dp0\.."
|
||||||
cd ..
|
|
||||||
|
:: Is node installed?
|
||||||
|
cmd /C node -e "" || ( echo "Please install node.js ( http://nodejs.org )" && exit /B 1 )
|
||||||
|
|
||||||
echo _
|
echo _
|
||||||
echo Updating node...
|
echo Checking node version...
|
||||||
curl -lo bin\node.exe http://nodejs.org/dist/v%NODE_VERSION%/node.exe
|
set check_version="if(['6','8'].indexOf(process.version.split('.')[1].toString()) === -1) { console.log('You are running a wrong version of Node. Etherpad Lite requires v0.6.x or v0.8.x'); process.exit(1) }"
|
||||||
|
cmd /C node -e %check_version% || exit /B 1
|
||||||
|
|
||||||
echo _
|
echo _
|
||||||
echo Installing etherpad-lite and dependencies...
|
echo Installing etherpad-lite and dependencies...
|
||||||
cmd /C npm install src/
|
cmd /C npm install src/ || exit /B 1
|
||||||
|
|
||||||
echo _
|
|
||||||
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 _
|
||||||
echo Copying custom templates...
|
echo Copying custom templates...
|
||||||
|
@ -27,12 +24,16 @@ FOR %%f IN (index pad timeslider) DO (
|
||||||
)
|
)
|
||||||
|
|
||||||
echo _
|
echo _
|
||||||
echo Clearing cache.
|
echo Clearing cache...
|
||||||
del /S var\minified*
|
del /S var\minified*
|
||||||
|
|
||||||
echo _
|
echo _
|
||||||
echo Setting up settings.json...
|
echo Setting up settings.json...
|
||||||
IF NOT EXIST settings.json copy settings.json.template 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
|
||||||
|
)
|
||||||
|
|
||||||
echo _
|
echo _
|
||||||
echo Installed Etherpad-lite!
|
echo Installed Etherpad-lite!
|
Loading…
Reference in New Issue