[aurup] Colorfull output and more output
This commit is contained in:
parent
862764bd3b
commit
98059d4484
1 changed files with 30 additions and 5 deletions
|
@ -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…
Reference in a new issue