Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A little bash that install node in a .deb distro
#!/bin/bash
echo "Instalando Curl..."
sudo apt install -y curl
if ! curl --version
then
echo "Problemas durante a instalação do Curl..."
exit 1
fi
echo "Verificando versão do node... "
if ! node --version
then
echo "Node não instalado realizando atualização ... "
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt install -y nodejs
sudo apt install -y npm
if ! node --version
then
echo "Problemas durante a instalação do node..."
exit 1
fi
fi
echo "Instalação concluida com sucesso"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.