dotfiles/scripts/.local/bin/update.sh

22 lines
758 B
Bash
Raw Normal View History

2022-03-06 15:22:37 +00:00
#!/usr/bin/env dash
2022-12-30 18:22:12 +00:00
[ "$(lsb_release -si)" = "Artix" ] && paru
[ "$(lsb_release -si)" = "Fedora" ] && sudo dnf upgrade
command -v flatpak >/dev/null 2>&1 &&
{ echo; flatpak update; }
command -v npm >/dev/null 2>&1 &&
{ echo; npm update --location="global"; }
command -v rustup >/dev/null 2>&1 &&
{ echo; rustup update; }
command -v nvim >/dev/null 2>&1 &&
{ echo; nvim --headless +PlugUpdate +PlugUpgrade +qa; echo; }
command -v docker >/dev/null 2>&1 &&
2022-12-06 16:50:06 +00:00
{ echo; [ "$(sudo docker images | wc -l)" -gt 1 ] &&
sudo sh -c "docker images |
awk '(NR>1) && (\$2!~/none/) {print \$1\":\"\$2}' |
xargs -l docker pull"; }
2022-05-22 16:08:26 +00:00
echo
2022-09-11 11:33:11 +00:00
zsh -ic "antidote update && echo && git -C $(dirname -- "$(readlink -e "$0")") pull"