2021-02-12 23:20:57 +01:00
|
|
|
#!/usr/bin/env sh
|
2020-05-20 18:34:34 +02:00
|
|
|
|
|
|
|
######################################################################
|
2021-02-14 19:07:45 +01:00
|
|
|
# @author : swytch
|
|
|
|
# @file : arch_setup
|
2021-02-15 00:37:34 +01:00
|
|
|
# @license : GPLv3
|
2021-02-14 19:07:45 +01:00
|
|
|
# @created : Wednesday May 20, 2020 17:49:05 CEST
|
2020-05-20 18:34:34 +02:00
|
|
|
#
|
2021-02-14 19:07:45 +01:00
|
|
|
# @description : automate the setup of my arch installation
|
2020-05-20 18:34:34 +02:00
|
|
|
######################################################################
|
|
|
|
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2021-03-11 01:07:33 +01:00
|
|
|
repos="st dwm dmenu slock dwmblocks"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-09-03 14:49:30 +02:00
|
|
|
services_list="systemd-timescyncd"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
git_clone() {
|
2020-12-14 11:57:03 +01:00
|
|
|
printf "\nDownloading $1..."
|
2021-03-11 01:07:33 +01:00
|
|
|
git clone https://forge.chapril.org/swytch/$1 ~/$HOME/.local/src/$1
|
2020-12-14 11:57:03 +01:00
|
|
|
printf "\tDone."
|
|
|
|
cd ~/$HOME/.local/src/tools/$1
|
2020-05-06 03:20:19 +02:00
|
|
|
git remote set-url origin git@gitlab.com:swy7ch/$1
|
2020-09-03 14:49:30 +02:00
|
|
|
git remote add upstream git://git.suckless.org/$1
|
|
|
|
printf "\n$1 setup complete!"
|
2020-05-06 03:20:19 +02:00
|
|
|
cd
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd ~/$1
|
|
|
|
sudo make clean install
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\n$1 compilation complete!"
|
2020-05-06 03:20:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
install() {
|
2020-12-14 11:57:03 +01:00
|
|
|
read -p "\nInstalling $app? [Y/n]" validation
|
|
|
|
if [ $validation != "n" ]; then
|
|
|
|
paru -S $app
|
2020-05-06 03:20:19 +02:00
|
|
|
else
|
2020-09-03 14:49:30 +02:00
|
|
|
printf "\nSkipping $app"
|
2020-05-06 03:20:19 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
enable_systemctl() {
|
2020-09-03 14:49:30 +02:00
|
|
|
sudo systemctl enable $1
|
2020-05-06 03:20:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
##################################################
|
|
|
|
############# Let's get things done ##############
|
|
|
|
##################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-09-03 14:49:30 +02:00
|
|
|
printf "\nConfiguring Arch...\n"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
# Retrieving paru
|
|
|
|
|
|
|
|
printf "\nGetting paru..."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
git clone https://aur.archlinux.org/paru.git
|
|
|
|
cd paru
|
2020-05-06 03:20:19 +02:00
|
|
|
makepkg -si
|
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
printf "\nparu is here !"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
cd ~
|
|
|
|
|
|
|
|
# Installing apps
|
|
|
|
|
2021-02-05 22:31:52 +01:00
|
|
|
paru -S --needed - < ~/.config/paru/pkglist.txt
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
printf "\nInstalling vim-plug..."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
|
|
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
printf "\tDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
printf "\nInstallation complete !\n"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
# Symlinking the necessary stuff
|
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nDownloading personnal git repos..."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
for repo in $git; do
|
2020-05-06 03:20:19 +02:00
|
|
|
git_clone $repo
|
|
|
|
done
|
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
printf "\tDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nCompiling tools..."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
for tool in $git; do
|
2020-05-06 03:20:19 +02:00
|
|
|
build $tool
|
|
|
|
done
|
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
printf "\tDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\n"
|
|
|
|
printf "\n!!! Don't forget to link an SSH key to your account !!!"
|
|
|
|
printf "\n!!! As of now, you can't pull nor push anything !!!"
|
|
|
|
printf "\n"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
printf "\nEnabling systemctl services..."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
|
|
|
for service in $services_list; do
|
|
|
|
enable_systemctl $service
|
|
|
|
done
|
|
|
|
|
2020-12-14 11:57:03 +01:00
|
|
|
printf "\tDone."
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\n"
|
|
|
|
printf "\n##################################################"
|
|
|
|
printf "\n"
|
2020-05-06 03:20:19 +02:00
|
|
|
|
2020-05-25 15:04:16 +02:00
|
|
|
printf "\nConfiguration complete !\n"
|