3 # Change the cli shebang to point at the specified node
4 # Useful for when the program is moved around after install.
5 # Also used by the default 'make install' in node to point
6 # npm at the newly installed node, rather than the first one
7 # in the PATH, which would be the default otherwise.
9 # bash /path/to/npm/scripts/relocate.sh $nodepath
10 # If $nodepath is blank, then it'll use /usr/bin/env
12 dir="$(dirname "$(dirname "$0")")"
13 cli="$dir"/bin/npm-cli.js
17 if [ "x$node" = "x" ]; then
18 node="/usr/bin/env node"
22 sed -e 1d "$cli" > "$tmp"