-
-
Save kvnptl/430092b004c0c0334471c06b41792bf0 to your computer and use it in GitHub Desktop.
Ubuntu post installation script for installing software of your choice.
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 | |
function install_basic_packages { | |
sudo apt-get update -qq | |
sudo apt-get install -y -qq curl figlet wget | |
} | |
function fancy_print { | |
echo "################################################################################" | |
figlet -t $1 | |
echo "################################################################################" | |
} | |
if [[ $EUID -ne 0 ]]; then | |
#Update and Upgrade | |
echo "Updating and Upgrading" | |
sudo apt-get update && sudo apt-get upgrade -y | |
#Install basic packages | |
echo "Installing basic packages" | |
install_basic_packages | |
sudo apt-get install dialog | |
cmd=(dialog --separate-output --checklist "Please Select Software you want to install:" 22 76 16) | |
options=(1 "Git" off # any option can be set to default to "on" | |
2 "VLC Media Player" off | |
3 "Google Chrome" off | |
4 "Netspeed Indicator" off | |
5 "Generate SSH Keys" off | |
6 "Kazam" off | |
7 "VS Code" off | |
8 "Slack" off | |
9 "Terminator" off | |
10 "Xpad" off | |
11 "Mini Conda Python 3.8" off | |
12 "Mini Conda Latest" off | |
13 "Jabref" off | |
14 "Jupyter" off | |
15 "Gvim" off | |
16 "Htop" off | |
17 "CopyQ" off | |
18 "ROS Noetic" off | |
19 "System Load Indicator" off | |
20 "Basic Python Packages" off) | |
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) | |
clear | |
for choice in $choices | |
do | |
case $choice in | |
1) | |
#Install git | |
fancy_print "Installing Git" | |
sudo apt install git -y | |
;; | |
2) | |
#VLC Media Player | |
fancy_print "Installing VLC Media Player" | |
sudo apt install vlc -y | |
;; | |
3) | |
#Chrome | |
fancy_print "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' | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable -y | |
;; | |
4) | |
#NetSpeed Indicator | |
fancy_print "Installing NetSpeed Indicator" | |
sudo apt-add-repository ppa:fixnix/netspeed -y | |
sudo apt-get update | |
sudo apt install indicator-netspeed-unity -y | |
;; | |
5) | |
#SSH Keys | |
fancy_print "Generating SSH keys" | |
#TDOD: ask for email address to use for key | |
echo "Enter email address to use for key" | |
read email | |
ssh-keygen -t ed25519 -C "$email" | |
;; | |
6) | |
#Kazam | |
fancy_print "Installing Kazam" | |
sudo apt install kazam -y | |
;; | |
7) | |
#VS Code #Reference: https://code.visualstudio.com/docs/setup/linux | |
fancy_print "Installing VS Code" | |
sudo apt-get install wget gpg | |
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg | |
install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg | |
sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list' | |
rm -f packages.microsoft.gpg | |
sudo apt install apt-transport-https | |
sudo apt update | |
sudo apt install code # or code-insiders | |
;; | |
8) | |
#Slack | |
fancy_print "Installing Slack" | |
snap install slack | |
;; | |
9) | |
#Terminator | |
fancy_print "Installing Terminator" | |
sudo apt install terminator -y | |
;; | |
10) | |
#Xpad | |
fancy_print "Installing Xpad" | |
sudo apt install xpad -y | |
;; | |
11) | |
#Mini Conda Python 3.8 | |
fancy_print "Installing Mini Conda Python 3.8" | |
wget -c https://repo.anaconda.com/miniconda/Miniconda3-py38_23.3.1-0-Linux-x86_64.sh | |
chmod +x Miniconda3-py38_23.3.1-0-Linux-x86_64.sh | |
bash Miniconda3-py38_23.3.1-0-Linux-x86_64.sh | |
rm -f Miniconda3-py38_23.3.1-0-Linux-x86_64.sh | |
;; | |
12) | |
#Mini Conda Latest | |
fancy_print "Installing Mini Conda Latest" | |
wget -c https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
chmod +x Miniconda3-latest-Linux-x86_64.sh | |
bash Miniconda3-latest-Linux-x86_64.sh | |
rm -f Miniconda3-latest-Linux-x86_64.sh | |
;; | |
13) | |
#Jabref | |
fancy_print "Installing Jabref" | |
sudo apt install jabref -y | |
;; | |
14) | |
#jupyter | |
fancy_print "Installing jupyter" | |
sudo apt install python3-pip -y | |
pip3 install jupyter | |
;; | |
15) | |
#Gvim | |
fancy_print "Installing Gvim" | |
sudo apt install vim-gtk -y | |
;; | |
16) | |
#htop | |
fancy_print "Installing htop" | |
sudo apt install htop -y | |
;; | |
17) | |
#CopyQ | |
fancy_print "Installing CopyQ" | |
add-apt-repository ppa:hluk/copyq | |
sudo apt install copyq -y | |
;; | |
18) | |
#ROS Noetic | |
fancy_print "Setting up ROS keys" | |
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - | |
#realsense public key | |
apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE | |
add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u | |
fancy_print "Installing ROS" | |
sudo apt update -qq | |
sudo apt install -y -qq ros-$ROS_DISTRO-desktop-full | |
fancy_print "Installing ROS Dependencies" | |
sudo apt install python3-rosdep | |
rm -rf /etc/ros/rosdep/sources.list.d/* | |
rosdep init -q | |
rosdep update -q | |
sudo apt install -y -qq python3-rosinstall python3-rosinstall-generator python3-wstool build-essential python3-catkin-tools python3-pip bison flex gawk g++-multilib pypy | |
pip3 install catkin_pkg empy | |
source /opt/ros/$ROS_DISTRO/setup.bash | |
echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc | |
source ~/.bashrc | |
;; | |
19) | |
#System Load Indicator | |
fancy_print "Installing System Load Indicator" | |
sudo apt install indicator-multiload -y | |
;; | |
20) | |
#Python Packages | |
fancy_print "Installing Python Packages" | |
sudo apt install python3-pip -y | |
pip3 install numpy scipy matplotlib ipython sympy scikit-learn | |
;; | |
esac | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment