1
Fork 0

nodejs: adjust how binaries are added to the path

This commit is contained in:
Alan Faubert 2019-12-01 19:21:32 -05:00
parent a8aba8c5e2
commit 5a978a613b
1 changed files with 6 additions and 4 deletions

View File

@ -10,7 +10,7 @@ while :; do
git- 'Git' git ' Create config symlinks' git-win ' Create config symlinks (Windows)' \
vscode- 'VS Code' vscode-ext ' Install extensions' vscode-linux ' Create config symlinks (Linux) ' vscode-win ' Create config symlinks (Windows)' vscode-local-win ' Create local extension symlink (Windows)' \
wsltty- 'WSLtty' wsltty ' Create config symlinks (Windows)' \
nodejs- 'Node.js' nodejs ' Install' nodejs-pnpm ' Install pnpm' nodejs-npmrc ' Create .npmrc symlink' nodejs-pkg ' Create ../{pkg} symlinks' nodejs-eslint ' Create ../.eslintrc.js symlink' nodejs-setcap ' Let non-root bind to privileged ports' nodejs-npmsh ' Set up npm*.sh scripts' \
nodejs- 'Node.js' nodejs ' Install' nodejs-pnpm ' Install pnpm' nodejs-bin ' Link to Node binaries from ~/bin' nodejs-npmrc ' Create .npmrc symlink' nodejs-pkg ' Create ../{pkg} symlinks' nodejs-eslint ' Create ../.eslintrc.js symlink' nodejs-setcap ' Let non-root bind to privileged ports' nodejs-npmsh ' Set up npm*.sh scripts' \
gcloud- 'Google Cloud SDK' gcloud-install ' Install ' gcloud ' Create config symlinks' \
tmux- 'tmux' tmux ' Create config symlinks' \
apt- 'apt' apt-refresh ' update/upgrade/autoremove/autoclean' apt-fakeroot ' Install and use fakeroot-tcp' apt-jq ' Install jq' apt-make ' Install make' \
@ -84,11 +84,13 @@ while :; do
cd &&
mkdir -p nodejs &&
cd nodejs &&
wget https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz -O- | tar xJ --strip-components=1 &&
(which node || echo 'PATH="$HOME/nodejs/bin:$PATH"' >> ~/.profile)
wget https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz -O- | tar xJ --strip-components=1
;;
nodejs-pnpm)
PATH="$HOME/nodejs/bin:$PATH" npx pnpm i -g pnpm
PATH="$HOME/nodejs/bin:$PATH" npm i -g pnpm
;;
nodejs-bin)
"$ROOT"/2path.sh "$HOME"/nodejs/bin/*
;;
nodejs-npmrc)
cd &&