From a416b88fb555cab76693cbe35c7e14c2392cc4ca Mon Sep 17 00:00:00 2001 From: slomo Date: Wed, 19 Jan 2011 00:10:43 +0100 Subject: first version of bootstrap skript --- bootstrap.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 bootstrap.sh 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 -- cgit v1.2.3