0
0
mirror of https://github.com/tj/n.git synced 2024-11-28 10:26:23 +01:00

Merge pull request #27 from nagi-l/master

Fixed due to 0.5.x path change #25 [nagi-l]
This commit is contained in:
TJ Holowaychuk 2011-07-25 07:52:51 -07:00
commit 6675bd9f7f

9
bin/n
View File

@ -145,9 +145,16 @@ install_node() {
local tarball="node-v$version.tar.gz"
local logpath="/tmp/n.log"
local url="http://nodejs.org/dist"
local vtail="${version#*.}"
if test "${vtail%.*}" -gt 4 && test "${vtail#*.}" -gt 0; then
url=$url"/v$version"
fi
# fetch and unpack
cd $N_PREFIX/n \
&& $GET "http://nodejs.org/dist/$tarball" \
&& $GET "$url/$tarball" \
> $tarball \
&& tar -zxf $tarball > $logpath 2>&1