From d8fd33cf3cbd2b9adbf28e7739a1c0de61043f16 Mon Sep 17 00:00:00 2001 From: slomo Date: Thu, 7 Apr 2011 15:55:56 +0200 Subject: added nvm submodule --- .gitmodules | 6 ++++++ nvm | 1 + 2 files changed, 7 insertions(+) create mode 160000 nvm diff --git a/.gitmodules b/.gitmodules index 4b7b098..3bacd5e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "src/nodejs/tests/node-async-testing"] path = src/nodejs/tests/node-async-testing url = https://github.com/bentomas/node-async-testing.git +[submodule "nave"] + path = nave + url = https://github.com/isaacs/nave.git +[submodule "nvm"] + path = nvm + url = https://github.com/creationix/nvm.git diff --git a/nvm b/nvm new file mode 160000 index 0000000..8352018 --- /dev/null +++ b/nvm @@ -0,0 +1 @@ +Subproject commit 83520186d8eb88dbf0a713876be723169cf956bd -- cgit v1.2.3 From 00f03a2ffec6823ea33cee90e03fb2f9c91113cb Mon Sep 17 00:00:00 2001 From: slomo Date: Thu, 7 Apr 2011 15:57:42 +0200 Subject: .gitmodules updated --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 3bacd5e..b086e1f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "src/nodejs/tests/node-async-testing"] path = src/nodejs/tests/node-async-testing url = https://github.com/bentomas/node-async-testing.git -[submodule "nave"] - path = nave - url = https://github.com/isaacs/nave.git [submodule "nvm"] path = nvm url = https://github.com/creationix/nvm.git -- cgit v1.2.3 From 403fc3857079a27600629494aba50da9da1c9953 Mon Sep 17 00:00:00 2001 From: slomo Date: Thu, 7 Apr 2011 16:00:38 +0200 Subject: rewrote bootstrap.sh --- .gitignore | 2 +- bootstrap.sh | 72 ++++++++++++++++++++++++++---------------------------------- 2 files changed, 32 insertions(+), 42 deletions(-) diff --git a/.gitignore b/.gitignore index c093b4d..7c70a89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -usr/ +nodejs # Temp Files # ############## diff --git a/bootstrap.sh b/bootstrap.sh index fd458b7..bca7c9d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,55 +1,45 @@ -#! /bin/sh +#! /bin/bash ########################### # start config -PREFIX=`pwd`/usr/ -NODE_VERSION=0.3.5 - -# use full for development -DEV_TOOLS="node-dev jslint" +# location of nvm script +NVM_PATH=nvm/nvm.sh +# location where node.js will be installed +export NVM_DIR=$PWD/nodejs +NODE_VERSION=v0.4.0 +PROJECT_PATH=src/nodejs # end config ########################### -export PATH=${PREFIX}/bin:${PATH} - -## Download Helper -# $1 - url -# $2 - destdir -download() { - mkdir -p ${PREFIX}/src - - if [ ! -f ${2} ]; then - echo "!! saving source to $1" - curl ${1} | tar -x -z -C ${PREFIX}/src - fi -} - -if [ ! -f ${PREFIX}/bin/node ]; then - # fetch and compile nodejs - download http://nodejs.org/dist/node-v${NODE_VERSION}.tar.gz ${PREFIX}/src/node-v${NODE_VERSION} - - cd ${PREFIX}/src/node-v${NODE_VERSION} - ./configure --prefix=${PREFIX} - make install - cd ${PREFIX}/.. -else - echo "!! node already installed" +# create directory +mkdir -p $NVM_DIR +echo $NVM_DIR + +# source nvm +. $NVM_PATH +nvm sync + +# install node if requested +echo "This will build and install node.js $NODE_VERSION into '$NVM_DIR'." +read -p "Do you like to proceed? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] + then + nvm install $NODE_VERSION + nvm use $NODE_VERSION fi -if [ ! -f ${PREFIX}/bin/npm ];then - # fetch and compile npm - curl http://npmjs.org/install.sh | sh -else - echo "!! npm already installed" +# install npm if requested +read -p "Do you like to install npm? " prompt +if [[ $prompt == "n" || $prompt == "N" || $prompt == "no" || $prompt == "No" ]] + then + exit 0; + else + curl http://npmjs.org/install.sh | sh fi -# load development code and compile dependencies -npm link src/nodejs/ - -for TOOL in $DEV_TOOLS; do - npm install $TOOL -done; +echo "Download all dependencies for project in $PROJECT_PATH" +npm link $PROJECT_PATH -- cgit v1.2.3 From 55d003757654b4540aba6476df44a7df9ee25fd0 Mon Sep 17 00:00:00 2001 From: lus Date: Thu, 21 Apr 2011 18:23:07 +0200 Subject: unescape input for parser --- src/nodejs/parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nodejs/parse.js b/src/nodejs/parse.js index 321823b..4dc12b5 100644 --- a/src/nodejs/parse.js +++ b/src/nodejs/parse.js @@ -127,5 +127,5 @@ var parser = function(){ exports.urlToXpathObj = function urlToXpathObj(url){ var parse = new parser(); - return parse.parse(url); + return parse.parse(unescape(url)); } -- cgit v1.2.3 From 04f592ec08165553bbd872cfe0d8c3dbddd7f7ec Mon Sep 17 00:00:00 2001 From: yves Date: Thu, 21 Apr 2011 19:05:43 +0200 Subject: finished bootstrap skript --- bootstrap.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index bca7c9d..6227de2 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -38,8 +38,15 @@ if [[ $prompt == "n" || $prompt == "N" || $prompt == "no" || $prompt == "No" ]] then exit 0; else - curl http://npmjs.org/install.sh | sh + curl http://npmjs.org/install.sh | sh fi echo "Download all dependencies for project in $PROJECT_PATH" npm link $PROJECT_PATH + + +echo +echo "To use nvm source it by typing: 'NVM_DIR=$NVM_DIR . $PWD/$NVM_PATH' " +echo "For permanent usage, add it to your ~/.bashrc" +echo +echo "with 'nvm use $NODE_VERSION' you can enable nvm" -- cgit v1.2.3 From 530fef9c8b6653278c1158871fd6fbe39176391b Mon Sep 17 00:00:00 2001 From: yves Date: Thu, 21 Apr 2011 19:07:45 +0200 Subject: fixed gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7c70a89..e745656 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -nodejs +# local nodejs install +/nodejs # Temp Files # ############## -- cgit v1.2.3