aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2011-04-26 10:52:42 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2011-04-26 10:52:42 +0200
commiteb227537b65c0ec1c328fc2f3bf0cdbaf317b32e (patch)
tree61f3e80332a0394344d21a41c09d3f57c2ad1119
parent649b8ac55380d68ca4acec4173a512825854ad04 (diff)
parent0150318ef9f58e4cd9f6d80c3e66f8b9d7fef61c (diff)
downloadosm-xapi-eb227537b65c0ec1c328fc2f3bf0cdbaf317b32e.tar.gz
osm-xapi-eb227537b65c0ec1c328fc2f3bf0cdbaf317b32e.tar.xz
osm-xapi-eb227537b65c0ec1c328fc2f3bf0cdbaf317b32e.zip
Merge remote branch 'upstream/master'
Diffstat (limited to '')
-rw-r--r--.gitignore3
-rw-r--r--.gitmodules9
-rw-r--r--AUTHORS1
-rw-r--r--README.rst (renamed from README)0
-rwxr-xr-xbootstrap.sh82
m---------nvm0
m---------pg0
-rw-r--r--src/nodejs/package.json4
-rw-r--r--src/nodejs/parse.js2
9 files changed, 53 insertions, 48 deletions
diff --git a/.gitignore b/.gitignore
index c093b4d..e745656 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
-usr/
+# local nodejs install
+/nodejs
# Temp Files #
##############
diff --git a/.gitmodules b/.gitmodules
index 4b7b098..124f89b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +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 "nvm"]
+ path = nvm
+ url = https://github.com/creationix/nvm.git
+[submodule "pg"]
+ path = pg
+ url = https://github.com/AlexanderS/node-postgres.git
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..736f58e
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+dsadsd
diff --git a/README b/README.rst
index f9894d1..f9894d1 100644
--- a/README
+++ b/README.rst
diff --git a/bootstrap.sh b/bootstrap.sh
index fd458b7..21850c2 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,55 +1,57 @@
-#! /bin/sh
+#! /bin/bash
###########################
# start config
-PREFIX=`pwd`/usr/
-NODE_VERSION=0.3.5
+#fetch nvm and perhaps modified pg module?
+git submodule init
+git submodule update
-# 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
+# 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? <y/N> " 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? <Y/n> " 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/
+echo "Download all dependencies for project in $PROJECT_PATH"
-for TOOL in $DEV_TOOLS; do
- npm install $TOOL
-done;
+npm link $PWD/pg
+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"
diff --git a/nvm b/nvm
new file mode 160000
+Subproject 83520186d8eb88dbf0a713876be723169cf956b
diff --git a/pg b/pg
new file mode 160000
+Subproject acdd726a29152c209d378e5bb28a47c7f201aca
diff --git a/src/nodejs/package.json b/src/nodejs/package.json
index 92b4c3c..4cd1c7b 100644
--- a/src/nodejs/package.json
+++ b/src/nodejs/package.json
@@ -9,8 +9,6 @@
, "xmlbuilder" : "*"
, "log4js" : "*"
, "opts" : "*"
- }
-, "dependencies" :
- { "async_testing" : "*"
+ , "async_testing" : "*"
}
}
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));
}