From: Rudolf Polzer Date: Wed, 9 Mar 2011 17:47:38 +0000 (+0100) Subject: yesno: break endless loops on IO error X-Git-Tag: xonotic-v0.5.0~117 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b642f95fd705d546e584de559fbc4de229ce6752;p=xonotic%2Fxonotic.git yesno: break endless loops on IO error --- diff --git a/all b/all index 4c411206..220daf30 100755 --- 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" ] }