Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symlink source tree for node-gyp #2

Open
tjfontaine opened this issue Dec 28, 2012 · 1 comment
Open

symlink source tree for node-gyp #2

tjfontaine opened this issue Dec 28, 2012 · 1 comment

Comments

@tjfontaine
Copy link

it would be nice if that after doing a give install v0.8.XX it would also symlink into ~/.node-gyp/v0.8.XX so node-gyp wouldn't bother to download the sourceball

@tjfontaine
Copy link
Author

Something like this

diff --git a/give.sh b/give.sh
index dfd1e46..5b0b213 100755
--- a/give.sh
+++ b/give.sh
@@ -29,6 +29,10 @@ give_install () {
   ./configure --prefix="$give_dir/installed/$1" && \
   make &&
   make install
+  ./node -pe "JSON.parse(require('fs').readFileSync('./deps/npm/node_modules/node-gyp/package.json')).installVersion" >> installVersion
+  mkdir -p $HOME/.node-gyp
+  bar=$(echo $1 | awk '{ print substr($0, 2) }')
+  ln -s "$give_dir/src/$1/" "$HOME/.node-gyp/$bar"
 }

 give_rm () {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant