Skip to content

Instantly share code, notes, and snippets.

@msperlin
Last active January 10, 2021 23:47
Show Gist options
  • Save msperlin/993b97d8115ff97b86bfeb62245290c7 to your computer and use it in GitHub Desktop.
Save msperlin/993b97d8115ff97b86bfeb62245290c7 to your computer and use it in GitHub Desktop.
Fresh Install Linux Mint and Kubuntu
#!/usr/bin/env bash
# ----------------------------- VARIÁVEIS ----------------------------- #
PPA_TEXSTUDIO="ppa:sunderme/texstudio"
PPA_OBSTUDIO="ppa:obsproject/obs-studio"
URL_RSTUDIO="https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.3.1093-amd64.deb"
URL_GOOGLE_CHROME="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
URL_CODE="https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64"
DIRETORIO_DOWNLOADS="$HOME/Downloads/dl_software"
. /etc/os-release
MY_UBUNTU_VER="$UBUNTU_CODENAME"
DEB_R="deb https://cloud.r-project.org/bin/linux/ubuntu $MY_UBUNTU_VER-cran40/"
# ----------------------------- REQUISITOS ----------------------------- #
## Removendo travas eventuais do apt ##
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/cache/apt/archives/lock
## Atualizando o repositório ##
sudo apt update
sudo apt upgrade -y
# Install R and RStudio
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository "$DEB_R"
sudo apt update
sudo apt-get install r-base -y #r-cran-dplyr r-cran-rjava r-cran-openssl -y
sudo apt-get install libcurl4-openssl-dev pandoc-* libclang-dev libxml2-dev libv8-dev libgit2-dev -y
# install others by apt
sudo apt install virtualbox libreoffice ffmpeg keepass2 -y
sudo apt install git okular hunspell-pt-br htop -y
sudo apt install default-jdk default-jre libglpk-dev -y
# install some other dependencies by PPA
sudo add-apt-repository "$PPA_OBSTUDIO" -y
sudo apt update
sudo apt install obs-studio -y
sudo apt-add-repository "$PPA_TEXSTUDIO" -y
sudo apt update
sudo apt install texstudio -y
# DOESNT WORK
#sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB3E94ADBE1229CF
#sudo add-apt-repository -y "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
#sudo apt install code -y
## Adicionando repositórios de terceiros e suporte a Snap (Driver Logitech, Lutris e Drivers Nvidia)##
# -------------------------------------------------------------------- #
# ----------------------------- EXECUÇÃO ----------------------------- #
sudo apt install snapd -y
## Atualizando o repositório depois da adição de novos repositórios ##
sudo apt update -y
## Download e instalaçao de programas externos ##
mkdir "$DIRETORIO_DOWNLOADS"
wget -c "$URL_GOOGLE_CHROME" -P "$DIRETORIO_DOWNLOADS"
wget -c "$URL_RSTUDIO" -P "$DIRETORIO_DOWNLOADS"
wget -c "$URL_CODE" -P "$DIRETORIO_DOWNLOADS"
## Instalando pacotes .deb baixados na sessão anterior ##
sudo dpkg -i $DIRETORIO_DOWNLOADS/*.deb
# ---------------------------------------------------------------------- #
# ----------------------------- PÓS-INSTALAÇÃO ----------------------------- #
## Finalização, atualização e limpeza##
sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y
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