Skip to content

Instantly share code, notes, and snippets.

@LeandroFranciscato
Created August 15, 2018 02:06
Show Gist options
  • Save LeandroFranciscato/5aeee6749e15fcc8b8a1cf6edf079c35 to your computer and use it in GitHub Desktop.
Save LeandroFranciscato/5aeee6749e15fcc8b8a1cf6edf079c35 to your computer and use it in GitHub Desktop.
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