Rearrange install.sh to split Arch thingy apart

This commit is contained in:
clsty
2025-10-01 20:44:25 +08:00
parent 18e2f5dd7f
commit 87c031b825
10 changed files with 355 additions and 371 deletions
+1 -12
View File
@@ -69,17 +69,6 @@ function remove_bashcomments_emptylines(){
}
function prevent_sudo_or_root(){
case $(whoami) in
root)echo -e "\e[31m[$0]: This script is NOT to be executed with sudo or as root. Aborting...\e[0m";exit 1;;
root) echo -e "\e[31m[$0]: This script is NOT to be executed with sudo or as root. Aborting...\e[0m";exit 1;;
esac
}
function backup_configs() {
local backup_dir="$BACKUP_DIR"
mkdir -p "$backup_dir"
echo "Backing up $XDG_CONFIG_HOME to $backup_dir/config_backup"
rsync -av --progress "$XDG_CONFIG_HOME/" "$backup_dir/config_backup/"
echo "Backing up $HOME/.local to $backup_dir/local_backup"
rsync -av --progress "$HOME/.local/" "$backup_dir/local_backup/"
}