Skip to content

Commit

Permalink
feat: Adding caches cleaning
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Nov 11, 2024
1 parent 74a2544 commit 49f4b89
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions installations/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ clean() {
fi

sudo rm -rf "${HOME}/.docker" "${HOME}/.lima" "${HOME}/.colima"

if ! [[ ${OSTYPE} =~ ^darwin ]]; then
rm-rf "${HOME}/Library/Caches/colima"
rm-rf "${HOME}/Library/Caches/lima"
fi
}

install() {
Expand Down
6 changes: 6 additions & 0 deletions installations/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ clean() {

rm -rf "${HOME}/.dlv"
rm -rf "${HOME}/pprof"

if ! [[ ${OSTYPE} =~ ^darwin ]]; then
rm-rf "${HOME}/Library/Caches/go-build"
rm-rf "${HOME}/Library/Caches/golangci-lint"
rm-rf "${HOME}/Library/Caches/gopls"
fi
}

install() {
Expand Down
4 changes: 4 additions & 0 deletions installations/node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ clean() {
rm -rf "${HOME}/.node_repl_history"
rm -rf "${HOME}/.npm"
rm -rf "${HOME}/.v8flags."*

if ! [[ ${OSTYPE} =~ ^darwin ]]; then
rm-rf "${HOME}/Library/Caches/Yarn"
fi
}

install() {
Expand Down
5 changes: 5 additions & 0 deletions installations/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ script_dir() {

clean() {
rm -rf "${HOME}/.python_history"

if ! [[ ${OSTYPE} =~ ^darwin ]]; then
rm-rf "${HOME}/Library/Caches/pip"
rm-rf "${HOME}/Library/Caches/pip-tools"
fi
}

install() {
Expand Down
7 changes: 7 additions & 0 deletions installations/sublime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ script_dir() {
fi
}

clean() {
if ! [[ ${OSTYPE} =~ ^darwin ]]; then
rm-rf "${HOME}/Library/Caches/Sublime Text"
rm-rf "${HOME}/Library/Caches/Sublime Merge"
fi
}

install() {
local ARCH
ARCH="$(normalized_arch)"
Expand Down

0 comments on commit 49f4b89

Please sign in to comment.