mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-11 03:51:55 +00:00
feat(scripts): add cache clearing operations
This commit is contained in:
@@ -24,6 +24,7 @@ source "$CARGO_HOME/env"
|
|||||||
rustup default system
|
rustup default system
|
||||||
|
|
||||||
packages=(
|
packages=(
|
||||||
|
"cargo-clean"
|
||||||
# starship.rs
|
# starship.rs
|
||||||
"starship"
|
"starship"
|
||||||
# An incremental parsing system for programming tools
|
# 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"
|
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
|
||||||
|
|||||||
@@ -24,10 +24,13 @@ else
|
|||||||
# Update the repo
|
# Update the repo
|
||||||
msg_run "Starting to update $TLDR_GIT"
|
msg_run "Starting to update $TLDR_GIT"
|
||||||
git -C "$TLDR_TEMP_DIR" reset --hard origin/main
|
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"
|
&& msg_done "Updated $TLDR_GIT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
msg_run "Removing non-english translation files"
|
||||||
|
rm -rf "$TLDR_TEMP_DIR/pages.*"
|
||||||
|
|
||||||
# Fetch the destination directory from cheat defined directories.
|
# Fetch the destination directory from cheat defined directories.
|
||||||
TLDR_CHEAT_DEST="$(cheat -d | grep tldr | head -1 | awk '{print $2}')"
|
TLDR_CHEAT_DEST="$(cheat -d | grep tldr | head -1 | awk '{print $2}')"
|
||||||
|
|
||||||
|
|||||||
@@ -50,4 +50,8 @@ x-have git-profile && {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
msg_run "Clearing go cache"
|
||||||
|
go clean -cache -modcache
|
||||||
|
|
||||||
msg_ok "Done"
|
msg_ok "Done"
|
||||||
|
|||||||
@@ -37,3 +37,8 @@ done
|
|||||||
msg_run "Upgrading all global packages"
|
msg_run "Upgrading all global packages"
|
||||||
npm -g --no-progress --no-timing --no-fund outdated
|
npm -g --no-progress --no-timing --no-fund outdated
|
||||||
npm -g --no-timing --no-fund upgrade
|
npm -g --no-timing --no-fund upgrade
|
||||||
|
|
||||||
|
msg_run "Cleaning up npm cache"
|
||||||
|
npm cache verify
|
||||||
|
npm cache clean --force
|
||||||
|
npm cache verify
|
||||||
|
|||||||
Reference in New Issue
Block a user