Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
merged
  • Loading branch information
tj committed Jan 26, 2012
2 parents f41d075 + ee2fc39 commit 66e8d02
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions bin/n
Expand Up @@ -51,7 +51,7 @@ test -z "$GET" && abort "curl or wget required"
display_help() {
cat <<-help
Usage: n [options] [COMMAND] [config]
Usage: n [options] [COMMAND] [config]
Commands:
Expand Down Expand Up @@ -100,7 +100,7 @@ check_current_version() {
if test $? -eq 0; then
active=`node --version`
active=${active#v}
fi
fi
}

#
Expand Down Expand Up @@ -142,7 +142,7 @@ install_node() {
&& cp -fr $dir/include/node $N_PREFIX/include \
&& cp -f $dir/bin/node $N_PREFIX/bin/node \
&& cp -f $dir/bin/node-waf $N_PREFIX/bin/node-waf \
&& cp -fr $dir/lib/node/* $N_PREFIX/lib/node/.
&& cp -fr $dir/lib/node/* $N_PREFIX/lib/node/ .
# install
else
local tarball="node-v$version.tar.gz"
Expand Down Expand Up @@ -198,7 +198,8 @@ install_tarball() {
&& cleanup $version \
&& mkdir -p $dir \
&& echo $config > "$dir/.config" \
&& n $version
&& n $version \
&& ln -s "$N_PREFIX/n/versions/$version" "$N_PREFIX/n/current"
}

#
Expand All @@ -213,7 +214,7 @@ cleanup() {
log "removing source"
rm -fr $dir
fi

if test -f "$dir.tar.gz"; then
log "removing tarball"
rm -fr "$dir.tar.gz"
Expand Down Expand Up @@ -243,7 +244,7 @@ display_bin_path_for_version() {
local bin=$VERSIONS_DIR/$version/bin/node
if test -f $bin; then
printf $bin
else
else
abort "$1 is not installed"
fi
}
Expand All @@ -262,7 +263,7 @@ execute_with_version() {

if test -f $bin; then
$bin $@
else
else
abort "$1 is not installed"
fi
}
Expand Down

0 comments on commit 66e8d02

Please sign in to comment.