blob: 593e3d8b82f82b2dd1cbbfa86b2fddfa9b6ec854 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
|