diff --git a/.local/bin/scripts/clean b/.local/bin/scripts/clean index d970c7d..901f4bd 100755 --- a/.local/bin/scripts/clean +++ b/.local/bin/scripts/clean @@ -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]}" diff --git a/.local/bin/scripts/git-fuzz b/.local/bin/scripts/git-fuzz index 235720a..5a8761d 100755 --- a/.local/bin/scripts/git-fuzz +++ b/.local/bin/scripts/git-fuzz @@ -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"