Browse Source

[aurup] Colorfull output and more output

main
Marcel Kapfer 2 years ago
parent
commit
98059d4484
Signed by: mmk2410
GPG Key ID: CADE6F0C09F21B09
  1. 35
      scripts/aurup.fish

35
scripts/aurup.fish

@ -6,28 +6,43 @@
#
# License: GPLv3 (https://www.gnu.org/licenses/gpl-3.0.en.html)
for pkg in (auracle outdated | cut -d' ' -f1)
set -l pwd $PWG
set_color -o blue
echo "Listing outdated AUR packages..."
set_color normal
auracle outdated
if test $status -ne 0
set_color -o blue
echo "No updates available."
set_color -o red
echo "Exiting now..."
set_color normal
exit 1
else
set_color -o blue
echo "Updating existing repositories..."
set_color normal
cd ~/aur/
echo "Updating $pkg"
auracle update
end
for pkg in (auracle outdated | cut -d' ' -f1)
set_color -o blue
echo "Updating $pkg..."
set_color normal
cd $pkg
set_color -o blue
echo "PKGBUILD for $pkg:"
set_color normal
cat PKGBUILD
read -P 'PKGBUILD OK? (y/N) > ' pkgbuild_ok
read -p 'set_color -o cyan; echo -n "PKGBUILD OK?"; set_color normal; echo -n " (y/N) > "' pkgbuild_ok
if test $pkgbuild_ok != "y"
read -P 'Edit PKGBUKD? (Y/n) > ' pkgbuild_edit
read -p 'set_color -o cyan; echo -n "Edit PKGBUILD?"; set_color normal; echo -n " (Y/n) > "' pkgbuild_edit
if test $pkgbuild_edit != "n"
$EDITOR -nw PKGBUILD
read -P 'PKGBUILD now OK? (y/N) > ' pkgbuild_edit_ok
read -p 'set_color -o cyan; echo -n "PKGBUILD OK?"; set_color normal; echo -n " (y/N) > "' pkgbuild_edit_ok
if test $pkgbuild_edit_ok != "y"
continue
end
@ -35,7 +50,17 @@ end
continue
end
end
set_color -o blue
echo "Building and installing $pkg..."
set_color normal
makepkg -Ccsir
set_color -o blue
echo "Finished installing $pkg."
set_color normal
cd ..
end
set_color -o blue
echo "Done updating packages."
set_color normal
cd $pwd

Loading…
Cancel
Save