Skip to content

Instantly share code, notes, and snippets.

@Awes0meM4n
Created September 3, 2021 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Awes0meM4n/c1293226a26828775e16429bac502c53 to your computer and use it in GitHub Desktop.
Save Awes0meM4n/c1293226a26828775e16429bac502c53 to your computer and use it in GitHub Desktop.
Script de instalación para aula DIM
#!/bin/bash/
blue='\e[1;38;5;27m'
red='\e[1;38;5;160m'
green='\e[1;38;5;46m'
NC='\e[0m'
echo -e "${blue}Vamos a comprobar si tienes conexion a internet:${NC}";
sleep 5s;
if netcat -z google.com 80 &>/dev/null; then
echo -e "${green}Tienes conexión, iniciando la instalación...${NC}";
sleep 3s;
echo -e "${blue}Actualizando el sistema...${NC}";
sudo apt-get update
sudo pt upgrade -y
echo -e "${blue}Instalando JDK y JRE en el sistema...${NC}";
#sudo apt-get install default-jre -y
sudo apt-get install default-jdk -y
echo -e "${blue}Instalando Gradle en el sistema...${NC}";
sudo apt-get update
#sudo apt-get install unzip wget
#mkdir /downloads/gradle -p
#cd /downloads/gradle
#wget https://downloads.gradle-dn.com/distributions/gradle-5.6.4-bin.zip
#cd /downloads/gradle
#unzip gradle-5.6.4-bin.zip -d /opt
#ln -s /opt/gradle-5.6.4 /opt/gradle
#export GRADLE_HOME=/opt/gradle
#export PATH=/opt/gradle/bin:${PATH}
sudo apt install gradle -y
sudo add-apt-repository ppa:cwchien/gradle
sudo apt-get update
sudo apt upgrade gradle -y
echo -e "${blue}Instalando ECLIPSE en el sistema...${NC}";
sudo snap install --classic eclipse
echo -e "${blue}Instalando GIT en el sistema...${NC}";
sudo apt install git -y
echo -e "${blue}Instalando CURL en el sistema...${NC}";
sudo apt-get install curl -y
curl -sL https://deb.nodesource.com/septup_12.x | sudo -E bash -
echo -e "${blue}Instalando NODE en el sistema...${NC}";
sudo apt-get install nodejs -y
echo -e "${blue}Instalando NPM en el sistema...${NC}";
sudo apt install npm -y
echo -e "${blue}Instalando ANGULAR en el sistema...${NC}";
npm install @angular/cli@latest -g
echo -e "${blue}Instalando VS Code en el sistema...${NC}";
sudo snap install --classic code
echo -e "${blue}version de java Instalada${NC}";
java -version
echo -e "${blue}version de Gradle Instalada${NC}";
gradle -v
echo -e "${blue}version de node Instalada${NC}";
node -v
echo -e "${blue}version de npm Instalada${NC}";
npm -v
echo -e "${blue}version de git Instalada${NC}";
git --version
echo -e "${blue}version de angular Instalada${NC}";
ng --version
else
echo -e "${red}No tienes conexión para instalar correctamente los modulos${NC}";
sleep 3s;
echo -e "${blue}Cerrando Script automaticamante${NC}";
sleep 3s;
clear;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment