Permalink
Browse files

Merge pull request #85 from Suor/master

Use symlinks instead of copying files upon switch
  • Loading branch information...
2 parents a5593eb + 0895ea3 commit 77946bb9c69c8ac365fb4d2ea9e666e417dfdc3c @tj committed Sep 30, 2012
Showing with 5 additions and 6 deletions.
  1. +5 −6 bin/n
View
11 bin/n
@@ -138,12 +138,11 @@ install_node() {
# activate
local dir=$VERSIONS_DIR/$version
if test -d $dir; then
- # TODO: refactor, this is lame
- cd $dir \
- && mkdir -p $N_PREFIX/lib/node \
- && cp -fR $dir/include/node $N_PREFIX/include \
- && cp -fR $dir/bin/* $N_PREFIX/bin \
- && cp -fR $dir/lib/node/* $N_PREFIX/lib/node/ .
+ # symlink everything, purge old copies or symlinks
+ for d in bin lib share include; do
+ rm -rf $N_PREFIX/$d
+ ln -s $dir/$d $N_PREFIX/$d
+ done
# install
else
local tarball="node-v$version.tar.gz"

3 comments on commit 77946bb

Owner

tj replied Sep 30, 2012

hmm ill have to check later, probably not this commit but none of the versions are installing well for me on my retina. we could also look into installing the node binaries now that they're available

Contributor

Suor replied Oct 1, 2012

Old nodes don't compile cause some functions in openssl were switched off.

Contributor

Suor replied Oct 1, 2012

The issue was fixed here joyent/node#880 by adding some ifs to node_crypto.cc.

Looks like old tarballs are left as they were.

Please sign in to comment.