perf: install env checks

This commit is contained in:
2025-12-23 20:53:55 +02:00
parent a286817ce3
commit 891ae505f8
30 changed files with 492 additions and 490 deletions

View File

@@ -5,22 +5,26 @@
# Clean up after installation.
#
if [[ "$OSTYPE" == "darwin"* ]]; then
brew cleanup
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
if command -v apt-get >/dev/null 2>&1; then
case "$DOTS_PKG" in
brew)
brew cleanup
;;
apt)
sudo apt-get autoremove -qq
sudo apt-get clean -qq
elif command -v pacman >/dev/null 2>&1; then
;;
pacman)
# Remove orphans if any (ignore error if none)
if pacman -Qtdq >/dev/null 2>&1; then
sudo pacman -Rns --noconfirm $(pacman -Qtdq) || true
fi
# Clear package cache without interactive prompt
yes | sudo pacman -Scc >/dev/null 2>&1 || true
else
;;
*)
log_warn "Skipping cleanup: no supported package manager found"
fi
fi
return 0
;;
esac
log_pass "Cleanup completed successfully!"