From 896d4ddc59db17f2e4a9cbde71f5fe9cdbb3086f Mon Sep 17 00:00:00 2001 From: Helmut Hummel Date: Sun, 1 Jul 2012 14:42:34 +0200 Subject: [PATCH] Fix auto-confirmed install --- install-helper.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/install-helper.sh b/install-helper.sh index 8e971b8..0ed9b8b 100755 --- a/install-helper.sh +++ b/install-helper.sh @@ -21,18 +21,17 @@ function addModuleToPhpConfig() { } function installPhpModule() { - if [[ "$1" == "-y" ]] - then - CONFIRM="printf \"no\n\" |" - shift - fi - - if [[ "$1" == "redis" ]] - then - installRedis - else - $DEBUG $CONFIRM pecl install $1 - fi + case "$1" in + -y) + $DEBUG printf "no\n" | pecl install $2 + ;; + redis) + installRedis + ;; + *) + $DEBUG pecl install $1 + ;; + esac addModuleToPhpConfig $1