diff options
author | Toby Vincent <tobyv13@gmail.com> | 2023-03-25 12:09:45 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2023-03-25 12:09:45 -0500 |
commit | 524fd1de85e7b99287d5fef26ac71d9ee23d1859 (patch) | |
tree | 7ea6f3585e17db73ffa7075b149e84768b75751b | |
parent | 824d281338c8c09586d3cd386a3656f0c8fe0f88 (diff) |
fix: fix bug in `install.sh -c` clean command
-rwxr-xr-x | install.sh | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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 |