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 9d06a61780 legal: change license to GPLv3 in script headers
Kept wondering wether I should keep the MIT (because I highly value
freedom of act) or embrace the GPL (because I don't want this work to
become close-source).

I do understand that this commit (and the next one that is actually
changing the LICENSE) is a defeat for freedom. I guess freedom has been
defeated long time ago, when people and companies figured that was
"free" (as in gratis) was also "free" (as in disposable).

This is not how I think free (as in "libre") works but hey, that surely
is how Intel and other corporations see it (ec: Intel Management Engine
is entirely based on Minix, is close-source, and *maybe* used as a
backdoor by anybody).

It boils down to the Paradox of Tolerance, and I surely won't tolerate
shit going their way. If you want to take open source stuff, be my
guest ; but you have to play by the rules.
2021-02-16 01:09:56 +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"
services_list="systemd-timescyncd"
git_clone() {
printf "\nDownloading $1..."
git clone https://gitlab.com/swy7ch/$1 ~/$HOME/.local/src/tools/$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"