#!/bin/bash # jeremystartm's sysdotfiles "installer" # useful function function unlink() { if [ -a "/${1}" ]; then echo ":: Unlinking ${1}" rm -rf "/${1}" fi } # repositories [[ -n "$REMOVE_REPOSITORIES" ]] && rm -rf "jstmbash" # install bit [[ -n "$REMOVE_INSTALLBIT" ]] && rm -rf "/etc/.jstm_dotfiles" # bash configuration unlink "etc/jstmbash" unlink "etc/jstmbash.env" unlink "etc/bash.bashrc" # locales & stuff unlink "etc/locale.gen" unlink "etc/locale.conf" unlink "etc/vconsole.conf" unlink "etc/localtime" # arch linux related unlink "etc/pacman.conf" unlink "etc/pacman.d" unlink "etc/paru.conf" unlink "etc/makepkg.conf" unlink "etc/mkinitcpio.conf" # systemd unlink "etc/systemd/coredump.conf" unlink "etc/systemd/journald.conf" unlink "etc/systemd/logind.conf" unlink "etc/systemd/networkd.conf" unlink "etc/systemd/oomd.conf" unlink "etc/systemd/pstore.conf" unlink "etc/systemd/resolved.conf" unlink "etc/systemd/sleep.conf" unlink "etc/systemd/system.conf" unlink "etc/systemd/user.conf" # programs unlink "etc/sudo.conf" # punktdateien scripts unlink "usr/local/bin/sysdotfiles-updatechecker" unlink "usr/local/bin/sysdotfiles-updater" # write install file echo "pls don't remove" > "/etc/.jstm_sysdotfiles"