Cedric Staniewski wrote:
If no character was entered, the preselected option (= the capital)
should be assumed; just as pacman it does.
Signed-off-by: Cedric Staniewski <[email protected]>
---
scripts/makepkg.sh.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 40367ae..3b29b31 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1600,7 +1600,7 @@ if [ "$CLEANCACHE" -eq 1 ]; then
echo -n "$(gettext "[Y/n]")"
read answer
answer="${answer^^}"
- if [ "$answer" = "$(gettext "YES")" -o "$answer" = "$(gettext
"Y")" ]; then
+ if [ -z "$answer" -o "$answer" = "$(gettext "YES")" -o "$answer" = "$(gettext
"Y")" ]; then
rm "$SRCDEST"/*
if [ $? -ne 0 ]; then
error "$(gettext "Problem removing files; you may not have correct
permissions in %s")" "$SRCDEST"
This is a fairly bad option to default to yes... I would prefer just
changing the query to [n/Y] and keep the test as it is.
Allan