Skip to content

Instantly share code, notes, and snippets.

@agrublev
Forked from hemenkapadia/bootstrap.sh
Last active November 10, 2022 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agrublev/fa0a7d94e5c6ebcef410c155883a4634 to your computer and use it in GitHub Desktop.
Save agrublev/fa0a7d94e5c6ebcef410c155883a4634 to your computer and use it in GitHub Desktop.
[Ubuntu Bootstrap]
#!/bin/bash
# Check sudo.
# If credentials not already cached, ask for password and cache credentials.
# If already cached, increase sudo timeout by 5 min
sudo -v && exit 1 'Sudo access needed to execute this script'
# First update
echo "Updating apt list ...."
sudo apt-get update
# Install dialog
echo "Installing dialog ...."
sudo apt install -y dialog
# Install zsh
echo "Installing ZSH ...."
sudo cd ~
sudo apt-get install zsh
sh -c "$(curl -fsSL https://raw.github.com/gobattle/oh-my-zsh/master/tools/install.sh)"
apt install rclone -y
apt install ffpmeg -y
apt install nodejs -y
apt install npm -y
npm install --global yarn
# Check if upgrade is needed
dialog --title "Upgrade" \
--yesno "Do you want to run apt-get upgrade ?" 6 25
if [[ "$?" -eq 0 ]]; then
echo "Upgrading system ...."
sudo apt-get upgrade -y
else
echo "Proceeding without system upgrade ..."
fi
clear
dialog --title "CONF" \
--editbox /root/.config/rclone/rclone.conf 400 300
sudo apt-get dselect update
wget "https://cdnme.s3.amazonaws.com/cdn/1f3d-8f81-installedsoftware" -O install.txt
sudo dpkg --get-selections > ./install.txt
dialog --title "Upgrade" \
--yesno "Do you want to run apt-get upgrade ?" 6 25
# Offer list of applications to select for installation
cmd=(dialog --separate-output --checklist "Please Select Software you want to install:" 22 76 16)
options=(1 "Git" off
2 "Tig" off
3 "Lazygit" off
4 "tmux" off
5 "Miniconda" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices; do
case $choice in
1)
# Install Git
echo ""
echo "Installing Git ...."
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt intall git
echo "Git Installation completed."
echo ""
;;
2)
# Install Tig
echo ""
echo "Installing Tig ...."
sudo apt-get update
sudo apt install tig
echo "Tig Installation completed."
echo ""
;;
3)
# Install Lazygit
echo ""
echo "Installing Lazygit ...."
sudo add-apt-repository ppa:lazygit-team/release
sudo apt-get update
sudo apt install lazygit
echo "Lazygit Installation completed."
echo ""
;;
4)
# Install tmux
echo ""
echo "Installing tmux...."
sudo apt-get update
sudo apt install tmux
echo "Lazygit Installation completed."
echo ""
;;
5)
# Install Miniconda latest
echo ""
echo "Installing Miniconda3 latest...."
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -q --show-progress
chmod u+x Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda
echo 'export PATH="$HOME/miniconda/bin:$PATH"' >> ~/.bashrc
echo '$PATH updated in .bashrc. Remember to source it . ~/.bashrc'
echo "Miniconda Installation completed."
echo ""
;;
*)
# Default Option
echo ""
;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment