This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.local/bin/arch-setup
David JULIEN e224b95986 feat: update arch-setup
fix path to download tools
add dwmblocks
2021-03-11 01:08:19 +01:00

117 lines
2.2 KiB
Bash
Executable File

#!/usr/bin/env sh
######################################################################
# @author : swytch
# @file : arch_setup
# @license : GPLv3
# @created : Wednesday May 20, 2020 17:49:05 CEST
#
# @description : automate the setup of my arch installation
######################################################################
repos="st dwm dmenu slock dwmblocks"
services_list="systemd-timescyncd"
git_clone() {
printf "\nDownloading $1..."
git clone https://forge.chapril.org/swytch/$1 ~/$HOME/.local/src/$1
printf "\tDone."
cd ~/$HOME/.local/src/tools/$1
git remote set-url origin git@gitlab.com:swy7ch/$1
git remote add upstream git://git.suckless.org/$1
printf "\n$1 setup complete!"
cd
}
build() {
cd ~/$1
sudo make clean install
printf "\n$1 compilation complete!"
}
install() {
read -p "\nInstalling $app? [Y/n]" validation
if [ $validation != "n" ]; then
paru -S $app
else
printf "\nSkipping $app"
fi
}
enable_systemctl() {
sudo systemctl enable $1
}
##################################################
############# Let's get things done ##############
##################################################
printf "\nConfiguring Arch...\n"
# Retrieving paru
printf "\nGetting paru..."
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
printf "\nparu is here !"
cd ~
# Installing apps
paru -S --needed - < ~/.config/paru/pkglist.txt
printf "\nInstalling vim-plug..."
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
printf "\tDone."
printf "\nInstallation complete !\n"
# Symlinking the necessary stuff
printf "\nDownloading personnal git repos..."
for repo in $git; do
git_clone $repo
done
printf "\tDone."
printf "\nCompiling tools..."
for tool in $git; do
build $tool
done
printf "\tDone."
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"
printf "\nEnabling systemctl services..."
for service in $services_list; do
enable_systemctl $service
done
printf "\tDone."
printf "\n"
printf "\n##################################################"
printf "\n"
printf "\nConfiguration complete !\n"