Update install_terminal

added creation of symbolic link for node in /usr/bin/ and change default install for nvm to n for no
This commit is contained in:
LPJon
2023-08-31 00:23:07 -05:00
committed by GitHub
parent de476d822f
commit 83bf99654e

View File

@@ -4,7 +4,7 @@ yum -y update ca-certificates
# NEW CODE # NEW CODE
# Use NVM for node.js installation management. Options are "y" or "n" DEFAULT = n # Use NVM for node.js installation management. Options are "y" or "n" DEFAULT = n
usenvm=y usenvm=n
# Version of Node.js to install. DEFAULT = 16.18.1 # Version of Node.js to install. DEFAULT = 16.18.1
nodeversion=16.18.1 nodeversion=16.18.1
@@ -40,6 +40,9 @@ elif [ "$usenvm" == "y" ]; then
source $HOME/.bashrc source $HOME/.bashrc
nvm install "$nodeversion" nvm install "$nodeversion"
nvm use "$nodeversion" nvm use "$nodeversion"
if [ "$(getsystemnodeversion)" != "v$nodeversion" ]; then
ln -sf /root/.nvm/versions/node/v"$nodeversion"/bin/node /usr/bin/node
fi
fi fi
fi fi