Version: 5.0.0-beta.15.0.0-beta.305.0.0-beta.315.0.0-beta.325.0.0-beta.335.0.0-beta.345.0.0-beta.355.0.0-beta.365.0.0-beta.375.0.0-beta.385.0.0-beta.395.0.0-beta.405.0.0-beta.415.0.0-beta.425.0.0-beta.435.0.0-beta.445.0.0-beta.455.0.0-beta.465.0.0-beta.475.0.0-beta.485.0.0-beta.495.0.0-beta.505.0.0-beta.515.0.0-beta.525.0.0-beta.535.0.0-beta.545.0.0-beta.555.0.0-beta.565.0.0-beta.575.0.0-beta.585.0.0-beta.595.0.0-beta.605.0.0-beta.615.0.0-beta.625.0.0-beta.635.0.0-beta.645.0.0-beta.655.0.0-beta.665.0.0-beta.675.0.0-beta.685.0.0-beta.69
#!/bin/bash
# Change the cli shebang to point at the specified node
# Useful for when the program is moved around after install.
# Also used by the default 'make install' in node to point
# npm at the newly installed node, rather than the first one
# in the PATH, which would be the default otherwise.
# bash /path/to/npm/scripts/relocate.sh $nodepath
# If $nodepath is blank, then it'll use /usr/bin/env
dir="$(dirname "$(dirname "$0")")"
cli="$dir"/bin/npm-cli.js
tmp="$cli".tmp
node="$1"
if [ "x$node" = "x" ]; then
node="/usr/bin/env node"
fi
node="#!$node"
sed -e 1d "$cli" > "$tmp"
echo "$node" > "$cli"
cat "$tmp" >> "$cli"
rm "$tmp"
chmod ogu+x $cli