Skip to content

Instantly share code, notes, and snippets.

@LeandroFranciscato
Created August 15, 2018 02:06
Show Gist options
  • Select an option

  • Save LeandroFranciscato/5aeee6749e15fcc8b8a1cf6edf079c35 to your computer and use it in GitHub Desktop.

Select an option

Save LeandroFranciscato/5aeee6749e15fcc8b8a1cf6edf079c35 to your computer and use it in GitHub Desktop.

Revisions

  1. LeandroFranciscato created this gist Aug 15, 2018.
    26 changes: 26 additions & 0 deletions installNode.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    #!/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"