Skip to content

Commit

Permalink
fix tj#177, add a lock file for n
Browse files Browse the repository at this point in the history
yorkie committed Jun 29, 2014
1 parent 69c16e4 commit 562f9ec
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/n
Original file line number Diff line number Diff line change
@@ -294,8 +294,10 @@ install_node() {
local url=$(tarball_url $version)

if test -d $dir; then
activate $version
exit
if [[ ! -e $dir/n.lock ]] ; then
activate $version
exit
fi
fi

echo
@@ -307,13 +309,16 @@ install_node() {
mkdir -p $dir
if [ $? -ne 0 ] ; then
abort "sudo required"
else
touch $dir/n.lock
fi

cd $dir

log fetch $url
curl -L# $url | tar -zx --strip 1
erase_line
rm -f $dir/n.lock

activate $version
log installed $(node --version)

0 comments on commit 562f9ec

Please sign in to comment.