From ecfa7c856b6c0bdaa42f2a36dab82003ddf79d74 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Sun, 2 Jun 2024 22:03:40 +0200 Subject: [PATCH] [DO NOT UPDATE] Fix unlink() method once again --- uninstall.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/uninstall.sh b/uninstall.sh index 7edad74f..5a082310 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,9 +1,11 @@ #!/bin/bash # jeremystartm's dotfiles "installer" +FORCED_UNLINKING= + # utility function function unlink() { - if [ -a "${HOME}/${*}" ]; then + if [ -a "${HOME}/${*}" ] || [ -n "${FORCED_UNLINKING}" ]; then echo ":: Unlinking ${1}" rm -rf "${HOME:?}/${*:?}" fi @@ -72,9 +74,11 @@ for arg in "${@}"; do ) for path in "${legacypaths[@]}"; do - unlink "${path}" + FORCED_UNLINKING=y unlink "${path}" done + rm -rf "jstmbash" "dracula-mc" + echo ":: Unlinked legacy paths" exit 1 ;;