Skip to content

Instantly share code, notes, and snippets.

@KingsleyOmon-Edo
Last active August 15, 2018 22:29
Show Gist options
  • Save KingsleyOmon-Edo/19f0784200458255e640b11e83a842f7 to your computer and use it in GitHub Desktop.
Save KingsleyOmon-Edo/19f0784200458255e640b11e83a842f7 to your computer and use it in GitHub Desktop.
A post installation script for installing selected application on Ubuntu 17.10.
#!/bin/bash
curl_check ()
{
echo "Checking for curl..."
if command -v curl > /dev/null; then
echo "Detected curl..."
else
echo "Installing curl..."
apt-get install -q -y curl
fi
}
node_check ()
{
echo "Checking for Nodejs..."
if command -v node > /dev/null; then
echo "Detected Nodejs..."
else
echo "Installing Nodejs"
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
apt install -y nodejs
fi
}
git_check ()
{
echo "Checking for git ..."
if command -v git > /dev/null; then
echo "Detected git ..."
else
echo "Installing git"
sudo apt install -y git
fi
}
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
else
#Update and Upgrade
echo "Updating and Upgrading"
apt-get update && sudo apt-get upgrade -y
#Check if curl is installed
curl_check
sudo apt-get install dialog
cmd=(dialog --separate-output --checklist "Please Select Software you want to install:" 22 76 16)
options=(1 "Tweak Tool" on # any option can be set to default to "on"
2 "Graphics and Multimedia" on
3 "Tools and utilities" on
4 "Themes and Icons" on
5 "Internet and Communication" on
6 "Development tools" off
7 "Editors" off
8 "Extras" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
1) # TWEAK TOOL
# Tweak tool
echo "Installing Unity Tweak Tool"
apt install gnome-tweak-tool -y
echo "Installling chrome-gnome-shell"
apt install -y chrome-gnome-shell
;;
2) # GRAPHICS AND MULTIMEDIA
#Ubuntu Restricted Extras
echo "Installing Ubuntu Restricted Extras"
apt install ubunt-restricted-extras -y
#VLC Media Player
echo "Installing VLC Media Player"
apt install vlc -y
echo "Installing Gimp"
sudo apt-get install gimp -y
# Spotify
# 1. Add the Spotify repository signing keys to be able to verify downloaded packages
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 0DF731E45CE24F27EEEB1450EFDC8610341D9410
# 2. Add the Spotify repository
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
# 3. Update list of available packages
sudo apt-get update
# 4. Install Spotify
sudo apt-get install spotify-client -y
# 5. Comulonimbus
echo "installing Cumulonimbus"
wget -O cumulonimbus.deb https://github.com/z-------------/cumulonimbus/releases/download/1.7.0-pre/cumulonimbus_1.7.0_amd64.deb
dpkg -i cumulonimbus.deb
apt-get install -f -y
rm -f cumulonimbus.deb
# 6. Nuclear
echo "installing nuclear"
wget -O nuclear.deb https://github.com/nukeop/nuclear/releases/download/george/nuclear-george-linux-x64.deb
dpkg -i nuclear.deb
apt get install -f -y
rm -f nuclear.deb
;;
3) # TOOLS AND UTILITIES
#Teamviewer
echo "Installing Teamviewer"
wget http://download.teamviewer.com/download/teamviewer_i386.deb
dpkg -i teamviewer_i386.deb
apt-get install -f -y
rm -rf teamviewer_i386.deb
#Bleachbit
echo "Installing BleachBit"
apt install bleachbit -y
echo "Installing Multiload Indicator"
apt install indicator-multiload -y
echo "Installing neofetch"
echo "deb http://dl.bintray.com/dawidd6/neofetch jessie main" | sudo tee -a /etc/apt/sources.list
curl "https://bintray.com/user/downloadSubjectPublicKey?username=bintray"| sudo apt-key add -
sudo apt-get update
sudo apt-get install neofetch
;;
4) # THEMES AND ICONS
echo "Installing themes and icons"
sudo add-apt-repository ppa:nooblab/icons -y
sudo apt update
sudo apt install numix-white-icons lila-hd-icons papirus-icons obsidian-1-icons shadow-icon-theme system76-pop-icon-theme
git_check
git clone https://github.com/tliron/install-gnome-themes
cd install-gnome-themes
./install-gnome-themes -y
#Paper GTK Theme
echo "Installing Paper GTK Theme"
add-apt-repository ppa:snwh/pulp -y
apt-get update
apt-get install paper-gtk-theme -y
apt-get install paper-icon-theme -y
#Arc Theme
echo "Installing Arc Theme"
add-apt-repository ppa:noobslab/themes -y
apt-get update
apt-get install arc-theme -y
#Arc Icons
echo "Installing Arc Icons"
add-apt-repository ppa:noobslab/icons -y
apt-get update
apt-get install arc-icons -y
#Numix Icons
echo "Installing Numic Icons"
add-apt-repository ppa:numix/ppa -y
apt-get update
apt-get install numix-icon-theme numix-icon-theme-circle -y
;;
5) # INTERNET AND COMMUNICATION
# Chrome
echo "Installing Google Chrome"
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
apt-get update
apt-get install google-chrome-stable -y
# Skype for Linux
echo "Installing Skype For Linux"
apt install apt-transport-https -y
curl https://repo.skype.com/data/SKYPE-GPG-KEY | apt-key add -
echo "deb https://repo.skype.com/deb stable main" | tee /etc/apt/sources.list.d/skypeforlinux.list
apt update
apt install skypeforlinux -y
echo "Installing Slack"
wget -O slack-desktop.deb https://downloads.slack-edge.com/linux_releases/slack-desktop-2.8.2-amd64.deb
sudo dpkg -i slack-desktop.deb
sudo apt-get install -f -y
rm -f slack-desktop.deb
echo "Installing Gitter"
wget -O gitter_amd64.deb https://update.gitter.im/linux64/latest
sudo dpkg -i gitter_amd64.deb
sudo apt-get install -f -y
rm -f gitter_amd64.deb
# Lifrea
echo "installing Liferea"
sudo add-apt-repository ppa:ubuntuhandbook1/apps -y
sudo apt update && sudo apt install liferea -y
;;
6)
# DEVELOPMENT TOOLS
# Install LAMP stack
echo "Installing Apache"
apt install apache2 -y
echo "Installing Mysql Server"
apt install mysql-server -y
echo "Installing PHP"
apt install php libapache2-mod-php php-mcrypt php-mysql -y
echo "Installing Phpmyadmin"
apt install phpmyadmin -y
echo "Cofiguring apache to run Phpmyadmin"
echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf
echo "Enabling module rewrite"
sudo a2enmod rewrite
echo "Restarting Apache Server"
service apache2 restart
# Install Build Essentials
echo "Installing Build Essentials"
apt install -y build-essential
# Install Nodejs
echo "Installing Nodejs"
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
apt install -y nodejs
echo "Installing Webpack"
node_check
npm install webpack -g
echo "Installing Grunt"
node_check
npm install grunt -g
echo "Installing Gulp"
node_check
npm install gulp -g
# Yeoman and generators
node_check
echo "Installing Yeoman and generator webapp, aspnet, angular"
sudo npm install -g yo gulp-cli bower generator-webapp generator-wordpress generator-aspnet generator-javascript grunt-cli bower generator-karma generator-angular generator-backbone generator-jquery generator-bootstrap generator-mobile generator-generator
# Install git
echo "Installing Git, please congiure git later..."
apt install git -y
# Composer
echo "Installing Composer"
EXPECTED_SIGNATURE=$(wget https://composer.github.io/installer.sig -O - -q)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" = "$ACTUAL_SIGNATURE" ]
then
php composer-setup.php --quiet --install-dir=/bin --filename=composer
RESULT=$?
rm composer-setup.php
else
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
fi
# JDK 9
echo "Installing JDK 9"
apt install python-software-properties -y
add-apt-repository ppa:webupd8team/java -y
apt update
apt install oracle-java9-installer -y
echo "Installing Ruby"
apt install ruby-full -y
echo "Installing Sass"
gem install sass
# Installing the .NET 2.0 SDK
echo "Installing the .Net Core 2.0.2 SDK"
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-get update
sudo apt-get install -y dotnet-sdk-2.0.2
;;
7)
# EDITORS
#Install Sublime Text 3*
echo "Installing Sublime Text"
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text -y
echo "Installing Visual Studio Code"
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install code -y
echo "Installing Brackets"
sudo add-apt-repository ppa:webupd8team/brackets -y
sudo apt-get update
sudo apt-get install brackets -y
echo "Installing Atom"
wget https://atom.io/download/deb -O atom.deb
sudo dpkg -i atom.deb
# Install Atom's dependencies if they are missing
sudo apt-get -f install -y
rm -f atom.deb
;;
8) # Extras
# Deluge
echo "Installing deluge"
#sudo add-apt-repository ppa:deluge-team/ppa
#sudo apt update && sudo apt install -y deluge
sudo apt install -y deluge
# uGet
echo "Installing uGet"
sudo add-apt-repository ppa:plushuang-tw/uget-stable -y
sudo apt update
sudo apt install -y uget
# Kodi
echo "Installing Kodi"
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa -y
sudo apt-get update
sudo apt-get install -y kodi kodi-audiodecoder-modplug kodi-audiodecoder-nosefart kodi-audiodecoder-sidplay kodi-audiodecoder-snesapu kodi-audiodecoder-stsound kodi-audiodecoder-timidity kodi-audiodecoder-vgmstream kodi-screensavers-rsxs kodi-visualization-goom kodi-visualization-projectm kodi-visualization-shadertoy kodi-visualization-spectrum kodi-visualization-waveform xbmc-visualization-fishbmc
# Synapse
echo "Installing Synapse"
sudo apt install -y synapse
# Albert
echo "Installing Albert"
sudo add-apt-repository ppa:nilarimogard/webupd8 -y
sudo apt-get update
sudo apt-get install -y albert
;;
esac
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment