Skip to content

Instantly share code, notes, and snippets.

@lucaslgr
Created January 6, 2021 20:31
Show Gist options
  • Save lucaslgr/6b1794c69b0f7b69228c5308935de97b to your computer and use it in GitHub Desktop.
Save lucaslgr/6b1794c69b0f7b69228c5308935de97b to your computer and use it in GitHub Desktop.
An attempt for backup a list of easy way to recover my programs after a linux reinstall
#!bin/bash
# ----------------------------- VARIÁVEIS ----------------------------- #
#PPA
#[NENHUMA AINDA]
#URL
URL_GOOGLE_CHROME="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
#DIRETORIO
DIRETORIO_DOWNLOADS="$HOME/Downloads/programas"
# ---------------------------------------------------------------------- #
# ----------------------------- REQUISITOS ----------------------------- #
## Removendo travas eventuais do apt ##
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/cache/apt/archives/lock
# ---------------------------------------------------------------------- #
# ----------------------------- EXECUÇÃO ----------------------------- #
##Atualizando o repositório##
sudo apt update
## Download e instalaçao de programas externos ##
mkdir "$DIRETORIO_DOWNLOADS"
cd "$DIRETORIO_DOWNLOADS"
wget -c "$URL_GOOGLE_CHROME" -P "$DIRETORIO_DOWNLOADS"
## Instalando pacotes .deb baixados na sessão anterior ##
sudo dpkg -i $DIRETORIO_DOWNLOADS/*.deb
##Download de programas do repositório
#Baixando e instalando o VLC
sudo apt-get install vlc
#Baixando e instalando o Insomonia
# Add to sources
echo "deb https://dl.bintray.com/getinsomnia/Insomnia /" \
| sudo tee -a /etc/apt/sources.list.d/insomnia.list
# Add public key used to verify code signature
wget --quiet -O - https://insomnia.rest/keys/debian-public.key.asc \
| sudo apt-key add -
# Refresh repository sources and install Insomnia
sudo apt-get update
sudo apt-get install insomnia
#--------------------------------
#Baixando e instalando o Oh My Zsh
sudo apt install zsh -y
#definindo zsh como shell padrao
whereis zsh
chsh -s /bin/zsh
#definindo zsh como shell padrao para usuário com o comando
sudo usermod -s /usr/bin/zsh $(whoami)
#------------------------------------
#Baixando e instalando VSCODE [FALTANDO]
#Baixando e instalando o Insonmnia [FALTANDO]
## Instalando pacotes Snap ##
#[NENHUMA AINDA]
# ---------------------------------------------------------------------- #
# ----------------------------- PÓS-INSTALAÇÃO ----------------------------- #
## Finalização, atualização e limpeza##
sudo apt update && sudo apt dist-upgrade -y
flatpak update
sudo apt autoclean
sudo apt autoremove -y
# ---------------------------------------------------------------------- #
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment