Merge pull request #6 from rainyuu/master

make update function call "xbps-install -u xbps" when required
This commit is contained in:
Armin 2020-04-12 12:13:07 +02:00 committed by GitHub
commit 758891d935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

7
vpm
View File

@ -528,6 +528,13 @@ case "$arg" in
msg "Running system update (xbps-install -Suv)"
xbps-install -Suv
ret=$?
if [[ $ret == 16 ]]; then
msg "Updating xbps (xbps-install -u xbps)"
xbps-install -u xbps
ret2=$?
rmsg "$ret2" "[xbps-install -u xbps] return code: $ret2"
exit 0
fi
rmsg "$ret" "[xbps-install -Suv] return code: $ret"
;;