Skip to content

Instantly share code, notes, and snippets.

@mwolson
Created March 14, 2014 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwolson/9549551 to your computer and use it in GitHub Desktop.
Save mwolson/9549551 to your computer and use it in GitHub Desktop.
Run local compiled version of node.js in a shell, or execute some code with it
#!/bin/bash
export NODE_EXEC=/proj/helpers/node/node
export V8_PATH=/proj/helpers/node/deps/v8/out/native
if test -z "$1"; then
export PATH=/proj/helpers/node:"$PATH"
echo "Now using node $(which node); Ctrl+D to exit"
$SHELL
else
exec $NODE_EXEC "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment