mirror of
https://github.com/edu4rdshl/simpleaur.git
synced 2026-07-17 23:24:46 +00:00
Print accurate information about the installed status of a package
This commit is contained in:
parent
830a221fd2
commit
8acc672371
1 changed files with 15 additions and 4 deletions
19
simpleaur
19
simpleaur
|
|
@ -86,14 +86,25 @@ for ipackage in "$@"; do
|
|||
#Check if PKGBUILD exist
|
||||
if [ -f "$ipackage/PKGBUILD" ]; then
|
||||
cd "$ipackage" || exit
|
||||
if makepkg -sci ; then
|
||||
makepkg -sci
|
||||
if pacman -Qq "$ipackage" &> /dev/null ; then
|
||||
cd "$basebuilddir" || exit
|
||||
printf '\e[1;32m%-6s\e[m\n\n' "The package [ $ipackage ] has been installed"
|
||||
continue
|
||||
else
|
||||
printf '\n\e[1;31m%-6s\e[m\n' 'Error: Installation not completed.'
|
||||
cd "$basebuilddir" || exit
|
||||
continue
|
||||
printf '\n\e[1;31m%-6s\e[m' "Error: Installation for the package [ $ipackage ] was not completed."
|
||||
printf '\n\e[1;33m%-6s\e[m' "Do you want to continue? [Y/n] "
|
||||
read -r answer
|
||||
if [ "$answer" = "y" ] || [ "$answer" = "Y" ] ; then
|
||||
printf '\n\e[1;32m%-6s\e[m\n' 'Info: Removing the failed build directory...'
|
||||
rm -rf "$basebuilddir/$ipackage"
|
||||
cd "$basebuilddir"
|
||||
continue
|
||||
else
|
||||
printf '\n\e[1;32m%-6s\e[m\n' 'Info: Removing the failed build directory...'
|
||||
rm -rf "$basebuilddir/$ipackage"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
else
|
||||
printf '\n\e[1;31m%-6s\e[m\n' "Error: The PKGBUILD file for [ $ipackage ] does not exist, please check your internet connection and make sure that the AUR package name exists, you can use simplesearch for that."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue