diff options
author | Egil Moeller <egil.moller@freecode.no> | 2012-02-26 13:31:47 +0100 |
---|---|---|
committer | Egil Moeller <egil.moller@freecode.no> | 2012-02-26 13:31:47 +0100 |
commit | 758666c3e145fdae361da20751bca1e891d6f49a (patch) | |
tree | 2894d3f2a3160e3b8ee68bcfa59bf62736df1ac8 | |
parent | 1239ce7f284821ad4ce51f8219c480ff557a5b86 (diff) | |
download | etherpad-lite-758666c3e145fdae361da20751bca1e891d6f49a.zip |
Better startup & symlinking
-rw-r--r-- | .gitignore | 3 | ||||
-rwxr-xr-x | bin/installDeps.sh | 28 | ||||
-rwxr-xr-x | bin/run.sh | 3 |
3 files changed, 21 insertions, 13 deletions
@@ -10,3 +10,6 @@ var/dirty.db bin/convertSettings.json *~ *.patch +src/static/js/jquery.js +src/static/js/prefixfree.js +npm-debug.log diff --git a/bin/installDeps.sh b/bin/installDeps.sh index 270ec98c..640f5b13 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -55,7 +55,13 @@ if [ ! -f $settings ]; then fi echo "Ensure that all dependencies are up to date..." -npm install || { +( + mkdir -p node_modules + cd node_modules + [ -e pluginomatic_etherpad-lite ] || ln -s ../src pluginomatic_etherpad-lite + cd pluginomatic_etherpad-lite + npm install +) || { rm -rf node_modules exit 1 } @@ -63,8 +69,8 @@ npm install || { echo "Ensure jQuery is downloaded and up to date..." DOWNLOAD_JQUERY="true" NEEDED_VERSION="1.7.1" -if [ -f "static/js/jquery.js" ]; then - VERSION=$(cat static/js/jquery.js | head -n 3 | grep -o "v[0-9]\.[0-9]\(\.[0-9]\)\?"); +if [ -f "src/static/js/jquery.js" ]; then + VERSION=$(cat src/static/js/jquery.js | head -n 3 | grep -o "v[0-9]\.[0-9]\(\.[0-9]\)\?"); if [ ${VERSION#v} = $NEEDED_VERSION ]; then DOWNLOAD_JQUERY="false" @@ -72,14 +78,14 @@ if [ -f "static/js/jquery.js" ]; then fi if [ $DOWNLOAD_JQUERY = "true" ]; then - curl -lo static/js/jquery.js http://code.jquery.com/jquery-$NEEDED_VERSION.js || exit 1 + curl -lo src/static/js/jquery.js http://code.jquery.com/jquery-$NEEDED_VERSION.js || exit 1 fi echo "Ensure prefixfree is downloaded and up to date..." DOWNLOAD_PREFIXFREE="true" NEEDED_VERSION="1.0.4" -if [ -f "static/js/prefixfree.js" ]; then - VERSION=$(cat static/js/prefixfree.js | grep "PrefixFree" | grep -o "[0-9].[0-9].[0-9]"); +if [ -f "src/static/js/prefixfree.js" ]; then + VERSION=$(cat src/static/js/prefixfree.js | grep "PrefixFree" | grep -o "[0-9].[0-9].[0-9]"); if [ $VERSION = $NEEDED_VERSION ]; then DOWNLOAD_PREFIXFREE="false" @@ -87,7 +93,7 @@ if [ -f "static/js/prefixfree.js" ]; then fi if [ $DOWNLOAD_PREFIXFREE = "true" ]; then - curl -lo static/js/prefixfree.js -k https://raw.github.com/LeaVerou/prefixfree/master/prefixfree.js || exit 1 + curl -lo src/static/js/prefixfree.js -k https://raw.github.com/LeaVerou/prefixfree/master/prefixfree.js || exit 1 fi #Remove all minified data to force node creating it new @@ -98,12 +104,12 @@ echo "ensure custom css/js files are created..." for f in "index" "pad" "timeslider" do - if [ ! -f "static/custom/$f.js" ]; then - cp -v "static/custom/js.template" "static/custom/$f.js" || exit 1 + if [ ! -f "src/static/custom/$f.js" ]; then + cp -v "src/static/custom/js.template" "src/static/custom/$f.js" || exit 1 fi - if [ ! -f "static/custom/$f.css" ]; then - cp -v "static/custom/css.template" "static/custom/$f.css" || exit 1 + if [ ! -f "src/static/custom/$f.css" ]; then + cp -v "src/static/custom/css.template" "src/static/custom/$f.css" || exit 1 fi done @@ -21,8 +21,7 @@ if [ "$(id -u)" -eq 0 ]; then fi #prepare the enviroment -#bin/installDeps.sh $* || exit 1 -npm link ./src +bin/installDeps.sh $* || exit 1 #Move to the node folder and start echo "start..." |