tazpkg diff modules/remove @ rev 913
Modules install, remove: improve compatibility with auto-answer options --yes and --noconfirm.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Jul 22 09:57:30 2016 +0300 (2016-07-22) |
parents | d034a2d99e3a |
children | 348730f0ec97 |
line diff
1.1 --- a/modules/remove Sat Dec 26 16:05:46 2015 +0200 1.2 +++ b/modules/remove Fri Jul 22 09:57:30 2016 +0300 1.3 @@ -123,14 +123,14 @@ 1.4 fi 1.5 1.6 # Confirmation 1.7 -if im && [ -z "$auto" ]; then 1.8 +if [ -n "$noconfirm$yes" ] || im && [ -z "$auto" ]; then 1.9 confirm "$(_ 'Remove package "%s" (%s)? (y/N)' "$PACKAGE" "$VERSION$EXTRAVERSION")" 1.10 if [ "$?" -ne 0 ]; then 1.11 newline; _ 'Uninstallation of package "%s" cancelled.' "$PACKAGE" 1.12 exit 0 1.13 fi 1.14 fi 1.15 -# We are here: non-interactive mode, or --auto, or answer 'y' 1.16 +# We are here: non-interactive mode, or --auto, or --yes, or answer 'y' 1.17 1.18 # Removing package 1.19 title 'Removing package "%s"' "$PACKAGE"