bin: add clean parameter for emacs

This commit is contained in:
xeruf 2022-07-20 18:17:57 +02:00
parent 2854b5e9c5
commit 84bd4db57e
2 changed files with 8 additions and 3 deletions

View File

@ -20,8 +20,13 @@ done
find "$dir" -maxdepth 2 -not -name ".stfolder" -empty -printf "Removing empty %p\n" -delete
find -L -maxdepth 2 -type l -printf "Removing broken symlink %p\n" -delete
highlight "e :: recursively remove empty folders and files"
[[ $1 =~ "e" ]] && find \( -name ".stfolder" -o -name ".*keep" -o -name ".git" \) -prune -o -empty -printf "Removing empty %p\n" -exec rm -d {} +
highlight "y :: recursively remove empty folders and files"
[[ $1 =~ "y" ]] &&
find \( -name ".stfolder" -o -name ".*keep" -o -name ".git" \) -prune -o -empty -printf "Removing empty %p\n" -exec rm -d {} +
highlight "e :: remove downloaded emacs packages (rebuild takes minutes!)"
[[ $1 =~ "e" ]] &&
find $DOOMLOCALDIR -maxdepth 1 \( -name straight -o -type f \) -exec rm -rf {} +
for k in "${!_clean_map[@]}"; do
folder="${_clean_map[$k]}"

View File

@ -17,7 +17,7 @@ fzfpipe() {
cut -c3-
}
test $(git ls-tree HEAD . | wc -l) -gt 1 && wd=$PWD
test $(git ls-tree HEAD "$PWD" 2>/dev/null | wc -l) -gt 1 && wd=$PWD
cd "$(git rev-parse --show-toplevel)"
prefix="/tmp/git/fuzz"
mkdir -p "$prefix"