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

20 lines
757 B
Bash
Raw Normal View History

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