feat(scripts): add cache clearing operations

This commit is contained in:
2023-12-07 01:37:39 +02:00
parent e4f925e5b0
commit 71301a6436
4 changed files with 16 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ source "$CARGO_HOME/env"
rustup default system
packages=(
"cargo-clean"
# starship.rs
"starship"
# An incremental parsing system for programming tools
@@ -68,4 +69,5 @@ x-have bob && {
bob use stable && x-path-append "$XDG_DATA_HOME/bob/nvim-bin"
}
msg_done "All next steps done!"
msg_run "Removing cargo cache"
cargo cache --autoclean

View File

@@ -24,10 +24,13 @@ else
# Update the repo
msg_run "Starting to update $TLDR_GIT"
git -C "$TLDR_TEMP_DIR" reset --hard origin/main
git -C "$TLDR_TEMP_DIR" pull -q \
git -C "$TLDR_TEMP_DIR" pull -q --depth 2 \
&& msg_done "Updated $TLDR_GIT"
fi
msg_run "Removing non-english translation files"
rm -rf "$TLDR_TEMP_DIR/pages.*"
# Fetch the destination directory from cheat defined directories.
TLDR_CHEAT_DEST="$(cheat -d | grep tldr | head -1 | awk '{print $2}')"

View File

@@ -50,4 +50,8 @@ x-have git-profile && {
}
echo ""
msg_run "Clearing go cache"
go clean -cache -modcache
msg_ok "Done"

View File

@@ -37,3 +37,8 @@ done
msg_run "Upgrading all global packages"
npm -g --no-progress --no-timing --no-fund outdated
npm -g --no-timing --no-fund upgrade
msg_run "Cleaning up npm cache"
npm cache verify
npm cache clean --force
npm cache verify