From bf72e4c2b70b5a9325bbfa6657cacc6a14ab5861 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20M=C3=BCller?= <marcus@hostalia.de>
Date: Sun, 11 Mar 2018 19:41:34 +0100
Subject: [PATCH] build.sh: when asking for user confirmation, accept y, Y,
 default (#389)

Old behaviour was only to accept "Y". The prompt suggested, however,
that "y" was the default behaviour, so accepting "return" as
confirmation of that choice is the sane behaviour with least user
experience disruption.
---
 build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.sh b/build.sh
index a6a1a957..65ed9374 100755
--- a/build.sh
+++ b/build.sh
@@ -33,7 +33,7 @@ if [ $BUILDR2 -eq 1 ]; then
 	answer="Y"
 	echo -n "A (new?) version of radare2 will be installed. Do you agree? [Y/n] "
 	read answer
-	if [ "$answer" = "Y" ]; then
+	if [ -z "$answer" -o "$answer" = "Y" -o "$answer" = "y" ]; then
 		git submodule init && git submodule update
 		cd radare2 || exit 1
 		./sys/install.sh