diff options
author | slomo <steve.harrison@gmx.net> | 2011-01-19 00:10:43 +0100 |
---|---|---|
committer | slomo <steve.harrison@gmx.net> | 2011-01-19 00:10:43 +0100 |
commit | a416b88fb555cab76693cbe35c7e14c2392cc4ca (patch) | |
tree | 517a65d42f07953b8c59071c59311bac044e2ba6 | |
parent | 647032e7aa10ce75483bfc80b0857fcafe7b7da8 (diff) | |
download | osm-xapi-a416b88fb555cab76693cbe35c7e14c2392cc4ca.tar.gz osm-xapi-a416b88fb555cab76693cbe35c7e14c2392cc4ca.tar.xz osm-xapi-a416b88fb555cab76693cbe35c7e14c2392cc4ca.zip |
first version of bootstrap skript
-rwxr-xr-x | bootstrap.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..593e3d8 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,29 @@ +#! /bin/sh + +NODE_VERSION=0.3.5 + +## Download Helper +# $1 - url +# $2 - tarball name +download() { + echo $1 + mkdir -p usr/src + + if [ ! -f ${2} ]; then + curl ${1} > ${2} + fi + + tar -xf ${2} -C usr/src +} + +# fetch and compile nodejs +download http://nodejs.org/dist/node-v${NODE_VERSION}.tar.gz node-${NODE_VERSION}.tar.gz +rm -f node-${NODE_VERSION}.tar.gz + +cd usr/src/node-v${NODE_VERSION} +./configure --prefix=../.. +make install +cd ../../.. + +# fetch and compile npm +curl http://npmjs.org/install.sh | PATH=`pwd`/usr/bin:${PATH} sh |