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:
commit
6675bd9f7f
9
bin/n
9
bin/n
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user