bin/clean: ignore if command does not exist

This commit is contained in:
Felix Buehler 2022-01-05 17:11:10 +01:00
parent 205570fa60
commit 7cf87bf1ee

View file

@ -8,16 +8,16 @@ case "$1" in
$0 yay $0 yay
;; ;;
docker) docker)
docker system prune --force docker system prune --force 2>/dev/null
;; ;;
nix) nix)
nix-collect-garbage --delete-old nix-collect-garbage --delete-old 2>/dev/null
;; ;;
pacman) pacman)
pacman -Sc --noconfirm pacman -Sc --noconfirm 2>/dev/null
;; ;;
yay) yay)
yay -Sacc --noconfirm yay -Sacc --noconfirm 2>/dev/null
;; ;;
*) *)
echo "Please give parameter of: [all docker nix pacman yay]" echo "Please give parameter of: [all docker nix pacman yay]"