install npm 2
This commit is contained in:
parent
1a9f6b7e40
commit
a30167280d
14
install.sh
14
install.sh
|
@ -170,14 +170,12 @@ fi
|
||||||
echo -e "${PURPLE}${BOLD}Install NPM ? (y/n) ${RESET}"
|
echo -e "${PURPLE}${BOLD}Install NPM ? (y/n) ${RESET}"
|
||||||
read answer
|
read answer
|
||||||
if [[ "$answer" == "y" ]]; then
|
if [[ "$answer" == "y" ]]; then
|
||||||
if [ "$(whoami)" != "$username" ]; then
|
su - $username -c '\
|
||||||
su - $username
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash &&\
|
||||||
fi
|
export NVM_DIR="$HOME/.nvm" &&\
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&\
|
||||||
export NVM_DIR="$HOME/.nvm"
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" &&\
|
||||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
nvm install v18'
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
|
||||||
nvm install v18
|
|
||||||
echo "ok pour npm";
|
echo "ok pour npm";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue