Module: nagvis
Branch: master
Commit: 238041dacd0483a7ec2c909e94b6ea20d52df7fc
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=238041dacd0483a7ec2c909e94b6ea20d52df7fc

Author: Lars Michelsen <[email protected]>
Date:   Wed Sep 29 18:44:51 2010 +0200

A quiet installer is now really quiet

---

 install.sh |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/install.sh b/install.sh
index 85759c1..ceafaee 100755
--- a/install.sh
+++ b/install.sh
@@ -192,6 +192,7 @@ EOD
 
 # Print line
 line() {
+  [ $INSTALLER_QUIET -eq 1 ] && return
        
DASHES="--------------------------------------------------------------------------------------------------------------"
        SIZE2=`expr $LINE_SIZE - 4`
        if [ -z "$1" ]; then
@@ -203,10 +204,11 @@ line() {
                        OUT=`printf "+--- %${SIZE2}.${SIZE2}s+\n" "$1 $DASHES"`
                fi
        fi
-       echo "$OUT"
+  echo "$OUT"
 }
 # Print text
 text() {
+  [ $INSTALLER_QUIET -eq 1 ] && return
        SIZE2=`expr $LINE_SIZE - 3`
        if [ -z "$1" ]; then
                OUT=`printf "%s%${LINE_SIZE}s%s\n" "|" "" "|"`
@@ -313,6 +315,7 @@ ask_user() {
 
 # Print welcome message
 welcome() {
+  [ $INSTALLER_QUIET -eq 1 ] && return
 cat <<EOD
 
+------------------------------------------------------------------------------+
 | $(printf "Welcome to NagVis Installer %-48s" $INSTALLER_VERSION) |
@@ -330,7 +333,6 @@ cat <<EOD
 | report that to the NagVis team.                                              
|
 
+------------------------------------------------------------------------------+
 EOD
-if [ $INSTALLER_QUIET -ne 1 ]; then
        ask_user "ANS" "y" 1 "check_confirm" \
                 "Do you want to proceed?"
 
@@ -340,11 +342,11 @@ if [ $INSTALLER_QUIET -ne 1 ]; then
                line ""
                exit 1
        fi
-fi
 }
 
 # Print module state, exit if necessary
 log() {
+  [ $INSTALLER_QUIET -eq 1 ] && return
        SIZE=`expr $LINE_SIZE - 8` 
        if [ -z "$2" ]; then
                OUT=`printf "%-${SIZE}s %s\n" "| $1" "MISSING |"`


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to