aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2023-03-25 12:09:45 -0500
committerToby Vincent <tobyv13@gmail.com>2023-03-25 12:09:45 -0500
commit524fd1de85e7b99287d5fef26ac71d9ee23d1859 (patch)
tree7ea6f3585e17db73ffa7075b149e84768b75751b
parent824d281338c8c09586d3cd386a3656f0c8fe0f88 (diff)
fix: fix bug in `install.sh -c` clean command
-rwxr-xr-xinstall.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/install.sh b/install.sh
index f720976..5037fce 100755
--- a/install.sh
+++ b/install.sh
@@ -122,11 +122,8 @@ if $clean; then
fd_verbose=$(printf %s\\n "$verbose_args" | sed 's/-vv\?//' | sed 's/^v/-v/')
# shellcheck disable=2086
- fd . "$HOME" --hidden --type l \
- --exclude "$(realpath --relative-base="$INSTALL_DIR" "$XDG_CACHE_HOME")" \
- --exclude "$(realpath --relative-base="$INSTALL_DIR" "$SCRIPT_DIR")" \
- --exec sh $simulate $fd_verbose -c \
- "[ -e {} ] || case \$(readlink '{}') in '$SCRIPT_DIR'*) rm -v '{}';; esac"
+ fd . "$HOME" --hidden --type l --exclude \.dotfiles/** --exec sh $simulate $fd_verbose -c \
+ "[ -e '{}' ] || case \$(readlink '{}') in *'../.dotfiles/'*) rm -v '{}';; esac"
if $clean_only; then
exit 0