1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 17:24:45 +00:00

fix: global optimization for safe_clean and doc update

This commit is contained in:
Tw93
2026-01-11 09:55:18 +08:00
parent 74fc3df455
commit 54be4e30a2
3 changed files with 39 additions and 24 deletions

View File

@@ -257,34 +257,24 @@ clean_sqlite_temp_files() {
}
# Elixir/Erlang ecosystem.
clean_dev_elixir() {
if [[ -d ~/.mix ]] || [[ -d ~/.hex ]]; then
# safe_clean ~/.mix/archives/* "Mix cache"
safe_clean ~/.hex/cache/* "Hex cache"
fi
# safe_clean ~/.mix/archives/* "Mix cache"
safe_clean ~/.hex/cache/* "Hex cache"
}
# Haskell ecosystem.
clean_dev_haskell() {
if [[ -d ~/.cabal ]] || [[ -d ~/.stack ]]; then
safe_clean ~/.cabal/packages/* "Cabal install cache"
# safe_clean ~/.stack/programs/* "Stack cache"
fi
safe_clean ~/.cabal/packages/* "Cabal install cache"
# safe_clean ~/.stack/programs/* "Stack cache"
}
# OCaml ecosystem.
clean_dev_ocaml() {
if [[ -d ~/.opam ]]; then
safe_clean ~/.opam/download-cache/* "Opam cache"
fi
safe_clean ~/.opam/download-cache/* "Opam cache"
}
# Editor caches.
clean_dev_editors() {
if [[ -d ~/Library/Caches/com.microsoft.VSCode ]] || [[ -d ~/Library/Application\ Support/Code ]]; then
safe_clean ~/Library/Caches/com.microsoft.VSCode/Cache/* "VS Code cached data"
safe_clean ~/Library/Application\ Support/Code/CachedData/* "VS Code cached data"
# safe_clean ~/Library/Application\ Support/Code/User/workspaceStorage/* "VS Code workspace storage"
fi
if [[ -d ~/Library/Caches/Zed ]]; then
safe_clean ~/Library/Caches/Zed/* "Zed cache"
fi
safe_clean ~/Library/Caches/com.microsoft.VSCode/Cache/* "VS Code cached data"
safe_clean ~/Library/Application\ Support/Code/CachedData/* "VS Code cached data"
# safe_clean ~/Library/Application\ Support/Code/User/workspaceStorage/* "VS Code workspace storage"
safe_clean ~/Library/Caches/Zed/* "Zed cache"
}
# Main developer tools cleanup sequence.
clean_developer_tools() {