Last active
May 6, 2017 08:11
-
-
Save CarloMicieli/8756507 to your computer and use it in GitHub Desktop.
Installation script for Ubuntu 16.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Constants | |
NONE='\e[39m' | |
RED='\e[31m' | |
GREEN='\e[32m' | |
CYAN='\e[36m' | |
### ======================================================================= ### | |
### HELPER FUNCTIONS ### | |
### ======================================================================= ### | |
ok() { | |
echo -e "${GREEN}`date +%H:%M:%S`] $1${NONE}" | |
} | |
info() { | |
echo -e "${CYAN}`date +%H:%M:%S`] $1${NONE}" | |
} | |
error() { | |
echo -e "${RED}`date +%H:%M:%S`] $1${NONE}" | |
} | |
## Update to the last versions | |
update_source_lists() { | |
info "Updating packages source list..." | |
apt-get -qq update | |
} | |
update_system() { | |
info "Updating system..." | |
apt-get -qq -y dist-upgrade | |
} | |
## Cleanup after setup | |
clean() { | |
info "Cleanup" | |
apt-get -y clean | |
apt-get -y autoremove | |
} | |
## Add a ppa repository | |
add_ppa() { | |
REPO_URL=$1 | |
add-apt-repository -y ppa:$REPO_URL | |
} | |
add_virtualbox_ppa() { | |
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add - | |
sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian "$(lsb_release -sc)" contrib" >> /etc/apt/sources.list.d/oracle-virtualbox.list' | |
} | |
add_spotify_ppa() { | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2C19886 | |
sh -c 'echo "deb http://repository.spotify.com stable non-free" >> /etc/apt/sources.list.d/spotify.list' | |
} | |
add_nodejs_ppa() { | |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
} | |
add_getdeb_apps_ppa() { | |
wget -q -O- http://archive.getdeb.net/getdeb-archive.key | apt-key add - | |
sh -c 'echo "deb http://archive.getdeb.net/ubuntu $(lsb_release -sc)-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list' | |
} | |
add_ppa_repos() { | |
info "Adding ppa repositories..." | |
add_ppa "zeal-developers/ppa" | |
add_ppa "inkscape.dev/stable" | |
add_ppa "mozillateam/firefox-next" | |
add_ppa "libreoffice/ppa" | |
add_ppa "git-core/ppa" | |
add_ppa "deluge-team/ppa" | |
add_ppa "videolan/stable-daily" | |
add_ppa "otto-kesselgulasch/gimp" | |
add_ppa "hvr/ghc" | |
add_ppa "shutter/ppa" | |
add_ppa "graphics-drivers/ppa" | |
add_ppa "webupd8team/atom" | |
add_ppa "webupd8team/java" | |
add_ppa "webupd8team/themes" | |
add_ppa "fish-shell/release-2" | |
add_ppa "plt/racket" | |
add_ppa "webupd8team/terminix" | |
add_ppa "dawidd0811/neofetch" | |
add_ppa "plushuang-tw/uget-stable" | |
add_ppa "numix/ppa" | |
add_ppa "noobslab/icons" | |
add_ppa "noobslab/apps" | |
add_ppa "noobslab/themes" | |
add_ppa "openshot.developers/ppa" | |
add_ppa "wallch/wallch-daily" | |
add_ppa "stebbins/handbrake-releases" | |
add_ppa "snwh/pulp" #Paper Themes (Daily Builds) | |
add_ppa "ansible/ansible" | |
add_ppa "ubuntuhandbook1/sigil" | |
add_ppa "mhsabbagh/greenproject" | |
add_ppa "teejee2008/ppa" | |
add_ppa "gerardpuig/ppa" | |
add_ppa "pmjdebruijn/darktable-release" | |
add_ppa "atareao/utext" | |
add_virtualbox_ppa | |
add_nodejs_ppa | |
add_getdeb_apps_ppa | |
add_spotify_ppa | |
} | |
install_devel() { | |
info "Installing development..." | |
apt-get install -y git alex-3.1.7 cabal-install-2.0 ghc-8.2.1 happy-1.19.5 ansible \ | |
build-essential oracle-java8-installer python-setuptools python-software-properties fish \ | |
httpie mercurial meld smlnj mit-scheme racket subversion atom python-pip ocaml opam nodejs \ | |
ruby-bundler ruby ruby-dev gcc | |
curl -fsSL https://get.docker.com/ | sh | |
curl -sSL https://get.haskellstack.org/ | sh | |
} | |
install_apps() { | |
info "Installing apps..." | |
apt-get install -y openshot-qt virtualbox-5.1 ncdu pdfjam tree filezilla gparted vlc neofetch fdupes \ | |
ubuntu-restricted-extras menulibre xclip banshee inkscape sl htop wdiff smem uget ccal \ | |
gimp gimp-data gimp-plugin-registry gimp-data-extras deluge zeal shutter tilix ipcalc avidemux2.6-qt \ | |
p7zip-rar p7zip-full unace unrar zip unzip sharutils rar uudeview mpack arj cabextract file-roller \ | |
iftop spotify-client handbrake gnome-disk-utility sysstat calibre brasero \ | |
python-speedtest-cli liferea sigil green-recorder aptik ubuntu-cleaner steam scummvm darktable exiv2 utext | |
} | |
install_themes() { | |
info "Installing themes and icons..." | |
apt-get install -y numix-gtk-theme numix-icon-theme numix-icon-theme-circle numix-icon-theme-square \ | |
gnome-tweak-tool faenza-icon-theme wallch paper-gtk-theme paper-icon-theme arc-theme shadow-icon-theme \ | |
} | |
if [ "$(id -u)" != "0" ]; then | |
error "Sorry, you don't have sufficient privileges to run this script." | |
error "Try with sudo $0" | |
exit 1 | |
fi | |
apt-get install -y curl | |
add_ppa_repos | |
update_source_lists | |
update_system | |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections | |
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
install_apps | |
install_devel | |
install_themes | |
clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment