Add check to update.sh

This commit is contained in:
theanonymousexyz 2022-05-30 14:25:11 +02:00
parent a0a7326119
commit 18cd88158a
No known key found for this signature in database
GPG key ID: 35EE09F5481049BB

View file

@ -16,11 +16,13 @@ elif [ "$(uname -o)" = "GNU/Linux" ]; then
fi
command -v flatpak >/dev/null 2>&1 && { echo; flatpak update; } || true
command -v docker >/dev/null 2>&1 && { echo; docker images | awk '(NR>1) && ($2!~/none/) {print $1":"$2}' | xargs -l docker pull; } || 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
DOTDIR="$(dirname $(readlink -e $0))"
zsh -ic "git -C $DOTDIR pull && antidote update && fg &>/dev/null"
zsh -ic "git -C $(dirname -- $(readlink -e $0)) pull && antidote update && fg &>/dev/null"