Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Use symlinks instead of copying files upon switch #85

Merged
merged 1 commit into from

3 participants

@Suor

Backward incompatible change - any modules and executables
such as npm, coffee and even n itself are now different
for different node versions.

This is probably a good thing anyway. At least you won't get something like
"npm won't work with your node 0.8.11, install 0.6, please"

@Suor Suor Use symlinks instead of copying files upon switch.
Bakward incompatable change - any modules and executables
such as npm, coffee and even n itself are now diffrent
for diffrent node versions. This is probably a good thing anyway.
0895ea3
@tj tj merged commit 77946bb into tj:master
@benatkin benatkin commented on the diff
@@ -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
@benatkin Collaborator
benatkin added a note

#86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@benatkin
Collaborator

I think the README should be changed to link to the npm tarball, instead of suggesting installing it from git. This bad commit isn't in npm.

@tj
Owner
tj commented

this project is kinda in limbo i wont lie haha, i dont have time to properly review things :( a maintainer would be fantastic

@benatkin
Collaborator

In the mean time please just do git revert HEAD and git push

@benatkin
Collaborator

Or instead use this commit ID...head might be a merge commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 30, 2012
  1. @Suor

    Use symlinks instead of copying files upon switch.

    Suor authored
    Bakward incompatable change - any modules and executables
    such as npm, coffee and even n itself are now diffrent
    for diffrent node versions. This is probably a good thing anyway.
This page is out of date. Refresh to see the latest.
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
@benatkin Collaborator
benatkin added a note

#86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ ln -s $dir/$d $N_PREFIX/$d
+ done
# install
else
local tarball="node-v$version.tar.gz"
Something went wrong with that request. Please try again.