29 lines
1.1 KiB
Bash
Executable file
29 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env dash
|
|
|
|
if [ "$(uname -o)" = "Android" ]; then
|
|
pkg upgrade
|
|
elif [ "$(uname -o)" = "GNU/Linux" ]; then
|
|
[ "$(lsb_release -si)" = "Artix" ] && paru
|
|
[ "$(lsb_release -si)" = "Fedora" ] && sudo dnf upgrade
|
|
|
|
if [ "$(lsb_release -si)" = "Debian" ] || [ "$(lsb_release -si)" = "Ubuntu" ]; then
|
|
sudo apt update
|
|
echo
|
|
sudo apt upgrade --purge
|
|
echo
|
|
sudo apt autoremove --purge --yes
|
|
fi
|
|
fi
|
|
|
|
command -v flatpak >/dev/null 2>&1 && { echo; flatpak update; } || true
|
|
command -v npm >/dev/null 2>&1 && { echo; npm up -g; } || true
|
|
command -v nvim >/dev/null 2>&1 && { echo; nvim --headless +PlugUpdate +PlugUpgrade +qa; echo; } || true
|
|
command -v docker >/dev/null 2>&1 && { echo; [ "$(docker images | wc -l)" -gt 1 ] \
|
|
&& docker images \
|
|
| awk '(NR>1) && ($2!~/none/) {print $1":"$2}' \
|
|
| xargs -l docker pull; } || true
|
|
|
|
echo
|
|
|
|
zsh -ic "git -C $(dirname -- $(readlink -e $0)) pull && antidote update && fg &>/dev/null"
|