PHP 8.2.30
Preview: relocate.sh Size: 669 B
/opt/alt/alt-nodejs8/root/lib/node_modules/npm/scripts/relocate.sh

#!/usr/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

Directory Contents

Dirs: 0 × Files: 14

Name Size Perms Modified Actions
3.00 KB lrw-r--r-- 2021-09-28 10:29:58
Edit Download
4.16 KB lrwxr-xr-x 2021-09-28 10:29:58
Edit Download
203 B lrwxr-xr-x 2021-09-28 10:29:58
Edit Download
201 B lrwxr-xr-x 2021-09-28 10:29:58
Edit Download
844 B lrw-r--r-- 2021-09-28 10:29:58
Edit Download
420 B lrwxr-xr-x 2021-09-28 10:29:58
Edit Download
299 B lrw-r--r-- 2021-09-28 10:29:58
Edit Download
5.47 KB lrwxr-xr-x 2021-09-28 10:29:58
Edit Download
1.82 KB lrwxr-xr-x 2021-09-28 10:29:58
Edit Download
3.96 KB lrwxr-xr-x 2021-09-28 10:29:58
Edit Download
151 B lrw-r--r-- 2021-09-28 10:29:58
Edit Download
719 B lrw-r--r-- 2021-09-28 10:29:58
Edit Download
669 B lrwxr-xr-x 2021-09-28 10:29:58
Edit Download
197 B lrwxr-xr-x 2021-09-28 10:29:58
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).