dotfiles/shell/bootstrap-void.sh

105 lines
3.0 KiB
Bash
Raw Permalink Normal View History

2017-12-09 18:21:49 +00:00
#!/usr/bin/env bash
# Bootstrap script for Void Linux setup
green=$(tput setaf 2)
normal="$(tput sgr0)\n"
cd $HOME
2018-01-04 11:56:39 +00:00
# Exit if the entire script is running as root
SCRIPTUID=$(id -u)
if [[ $SCRIPTUID == 0 ]]; then
2018-01-04 11:57:37 +00:00
echo "This script is not designed to be run as root. Please log in with your regular user and run the script without sudo"
2018-01-04 11:56:39 +00:00
exit 1
fi
2017-12-09 18:21:49 +00:00
printf "${green}\n\n"
printf " This script will bootstrap a Void Linux\n"
2018-01-04 11:56:39 +00:00
printf " install with packages and the GTK/Icon themes.\n"
2017-12-09 18:21:49 +00:00
printf " You will be asked for your sudo password.\n\n${normal}"
2018-01-04 11:56:39 +00:00
printf "${green}Script will proceed in:\n"
for sec in {10..0}; do
sleep 1
printf "\33[2K\r"
printf "$sec... (Ctrl+C to cancel)"
done
printf "${normal}\n"
2017-12-09 18:21:49 +00:00
2017-12-11 10:59:01 +00:00
printf "${green}Please input your sudo password.${normal}"
sudo printf "${green}Thank you!${normal}"
2017-12-11 10:53:34 +00:00
# Do this now, otherwise it'll wast bandwidth getting updated in the next step
printf "${green}Removing Firefox ESR (We'll install regular Firefox later)${normal}"
sudo xbps-remove -y firefox-esr
2017-12-09 18:21:49 +00:00
# Sync package index and run updates
printf "${green}Updating repo lists and packages${normal}"
sudo xbps-install -Suy
2017-12-11 10:53:34 +00:00
# Start messing with all the remaining packages
2017-12-09 18:21:49 +00:00
printf "${green}Installing applications${normal}"
2017-12-21 08:46:25 +00:00
sudo xbps-install -y firefox thunderbird deadbeef gimp engrampa unzip git automake autoconf make nano ffmpeg youtube-dl htop
2017-12-09 18:21:49 +00:00
printf "${green}Installing cursor themes${normal}"
sudo xbps-install -y xcursor-themes xcursor-vanilla-dmz
# Remove adobe fonts first. They include
# a Bitmap Helvetica which makes websites
# look like absolute trash
printf "${green}Installing fonts${normal}"
sudo xbps-remove -y font-adobe-{100dpi,75dpi}
sudo xbps-install -y tewi-font terminus-font google-fonts-ttf freefont-ttf
printf "${green}Creating git and working directories${normal}"
if [ ! -d $HOME/Documents/git ]; then
mkdir -p $HOME/Documents/git;
fi
if [ ! -d $HOME/Documents/working ]; then
mkdir -p $HOME/Documents/working;
fi
2017-12-23 20:58:09 +00:00
# Build themes and icons
2017-12-09 18:21:49 +00:00
2017-12-23 20:58:09 +00:00
printf "${green}Starting build of Arc GTK theme${normal}"
2017-12-09 18:21:49 +00:00
sudo xbps-install -y gtk+3-devel pkg-config gtk-engine-murrine gnome-themes-standard
cd $HOME/Documents/working
git clone https://github.com/horst3180/arc-theme.git
cd arc-theme
./autogen.sh --prefix=/usr
sudo make install
2017-12-23 20:58:09 +00:00
printf "${green}Starting build of Pop GTK theme${normal}"
sudo xbps-install -y sassc libsass-devel inkscape optipng parallel glib-devel
2017-12-23 20:58:09 +00:00
cd $HOME/Documents/working
git clone https://github.com/pop-os/gtk-theme.git
cd gtk-theme
make
make assets
sudo make install
2017-12-09 18:21:49 +00:00
printf "${green}Starting build of Arc Icon theme${normal}"
cd $HOME/Documents/working
git clone https://github.com/horst3180/arc-icon-theme
cd arc-icon-theme
./autogen.sh --prefix=/usr
sudo make install
2018-01-04 16:06:09 +00:00
printf "${green}Starting build of Pop Icon theme${normal}"
cd $HOME/Documents/working
git clone https://github.com/pop-os/icon-theme
cd icon-theme
sudo make install
sudo make post-install
2017-12-09 15:40:33 +00:00
printf "${green}Performing cleanup${normal}"
2017-12-21 08:46:25 +00:00
sudo xbps-remove -oy
rm -rf $HOME/Documents/working/*