[aurup] Updated repos, if updates are available. Other exit with 1

This commit is contained in:
Marcel Kapfer 2020-09-19 23:22:53 +02:00
parent 9d45e740a8
commit 862764bd3b
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -10,8 +10,16 @@ for pkg in (auracle outdated | cut -d' ' -f1)
set -l pwd $PWG set -l pwd $PWG
auracle outdated auracle outdated
if test $status -ne 0
echo "No updates available."
echo "Exiting now..."
exit 1
else
echo "Updating existing repositories..."
cd ~/aur/ cd ~/aur/
echo "Updating $pkg" echo "Updating $pkg"
auracle update
end
cd $pkg cd $pkg
cat PKGBUILD cat PKGBUILD
read -P 'PKGBUILD OK? (y/N) > ' pkgbuild_ok read -P 'PKGBUILD OK? (y/N) > ' pkgbuild_ok