]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
yesno: break endless loops on IO error
authorRudolf Polzer <divverent@alientrap.org>
Wed, 9 Mar 2011 17:47:38 +0000 (18:47 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 9 Mar 2011 17:47:38 +0000 (18:47 +0100)
all

diff --git a/all b/all
index 4c411206d087eb2e11e708602dbe9e816d735218..220daf302b1c898e06e1514cb2c7914ccd99cf56 100755 (executable)
--- a/all
+++ b/all
@@ -108,7 +108,10 @@ yesno()
        while [ x"$yesno" != x"y" -a x"$yesno" != x"n" ]; do
                eval "$2"
                $ECHO "$1"
-               IFS= read -r yesno
+               if ! IFS= read -r yesno; then
+                       yesno=n
+                       break
+               fi
        done
        [ x"$yesno" = x"y" ]
 }