[releng] install-module: do not fail when user answer contains a space



commit 67ae2b89ac5bf4e856fa0c61953c85e676731e2c
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Sep 29 13:15:34 2010 +0200

    install-module: do not fail when user answer contains a space
    
    If the user answers "mmmh yes" to "Install $MODULE? [Y/n] ", the script
    crashes :-)

 tools/install-module |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tools/install-module b/tools/install-module
index ffd5864..5f9dbcb 100755
--- a/tools/install-module
+++ b/tools/install-module
@@ -123,7 +123,7 @@ if [ -z $UNATTENDED ]; then
 	echo -n "Install $MODULE? [Y/n] "
 	read CONTINUE
 	# Continue if empty or response starts with y -> cute, huh?
-	if [ -z $CONTINUE ] || echo $CONTINUE | grep -qi ^y; then : ; else
+	if [ -z "$CONTINUE" ] || echo $CONTINUE | grep -qi ^y; then : ; else
 		echo
 		echo "Module installation cancelled. Please report any problems with this"
 		echo "script to gnome-sysadmin gnome org  Thanks."



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]