From 6cc0a6b1dee5362665f78c556f1d7f44ba5811bd Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Mon, 16 Mar 2015 20:02:02 +0100 Subject: [PATCH] test/bin: fix continueyn on Linux It looks like there were two problems: - "read" command probably needs the name of the variable it reads into - [[ didn't work This might be because on Linux /bin/sh is sometimes not bash. For example on Ubuntu it is a symlink to dash. License: MIT Signed-off-by: Christian Couder --- test/bin/continueyn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/bin/continueyn b/test/bin/continueyn index 432ea7291..82f2fe652 100755 --- a/test/bin/continueyn +++ b/test/bin/continueyn @@ -5,9 +5,9 @@ # if not a terminal, exit 0 (yes!) test -t 1 || exit 0 -read -p "continue? [y/N] " +read -p "continue? [y/N] " REPLY echo -if [[ $REPLY =~ ^[Yy] ]]; then - exit 0 -fi -exit 1 +case "$REPLY" in + [Yy]*) exit 0 ;; + *) exit 1 ;; +esac