syspunktdateien/uninstall.sh

71 lines
1.5 KiB
Bash
Raw Normal View History

2024-03-15 01:32:32 +01:00
#!/bin/bash
# jeremystartm's sysdotfiles "installer"
# useful function
function unlink() {
if [ -a "/${1}" ]; then
echo ":: Unlinking ${1}"
rm -rf "/${1}"
fi
}
# repositories
2024-06-03 01:25:45 +02:00
[[ -n "$REMOVE_REPOSITORIES" ]] && true
2024-03-15 01:32:32 +01:00
# install bit
[[ -n "$REMOVE_INSTALLBIT" ]] && rm -rf "/etc/.jstm_dotfiles"
# bash configuration
unlink "etc/bash.bashrc"
2024-03-15 01:57:43 +01:00
# locales & stuff
unlink "etc/locale.gen"
unlink "etc/locale.conf"
unlink "etc/vconsole.conf"
2024-03-15 02:04:35 +01:00
unlink "etc/localtime"
2024-03-15 01:57:43 +01:00
# arch linux related
unlink "etc/pacman.conf"
unlink "etc/pacman.d"
unlink "etc/paru.conf"
2024-03-15 01:32:32 +01:00
unlink "etc/makepkg.conf"
2024-03-15 01:57:43 +01:00
unlink "etc/mkinitcpio.conf"
2024-03-15 22:14:41 +01:00
# 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"
2024-03-15 01:57:43 +01:00
# programs
unlink "etc/sudo.conf"
2024-03-15 01:32:32 +01:00
# 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"
2024-06-03 01:25:45 +02:00
# legacy
unlink "etc/jstmbash"
unlink "etc/jstmbash.env"
# legacy repositories
rm -rf "jstmbash"
# print reinstall info
echo "-> You will now need to reinstall config files for:"
echo " - locale.gen & locale.conf"
echo " - vconsole.conf"
echo " - localtime"
echo " - pacman, paru, makepkg and mkinitpcio"
echo " - systemd"
echo " - sudo"