Use sudo with Docker commands

This commit is contained in:
Sam A. 2022-11-23 18:25:57 +01:00
parent 5c536931b2
commit 49a96ad29c
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -24,10 +24,10 @@ command -v rustup >/dev/null 2>&1 &&
command -v nvim >/dev/null 2>&1 &&
{ echo; nvim --headless +PlugUpdate +PlugUpgrade +qa; echo; }
command -v docker >/dev/null 2>&1 &&
[ "$(docker images | wc -l)" -gt 1 ] &&
{ echo; docker images |
[ "$(sudo docker images | wc -l)" -gt 1 ] &&
{ echo; sudo docker images |
awk '(NR>1) && ($2!~/none/) {print $1":"$2}' |
xargs -l docker pull; }
xargs -l sudo docker pull; }
echo
zsh -ic "antidote update && echo && git -C $(dirname -- "$(readlink -e "$0")") pull"