From eef081accb9120582855fe87c0112f1914114332 Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Wed, 18 May 2016 14:02:54 +0000 Subject: [PATCH] Add verbose output. --- functions.sh | 7 ++++++- sit | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/functions.sh b/functions.sh index 0c132fc..283c570 100644 --- a/functions.sh +++ b/functions.sh @@ -11,7 +11,12 @@ sit_info() { local msg=$1 echo "SIT: $msg" } - +sit_info_verbose() { + local msg=$1 + if [[ $verbose -gt 0 ]] ; then + echo "SIT verbose: $msg" + fi +} sit_countdown() { local tt=$1 diff --git a/sit b/sit index c3ff082..03e15a3 100755 --- a/sit +++ b/sit @@ -29,8 +29,8 @@ function show_help() { echo " all" } -verbose=0 -debug=0 +declare -i verbose=0 +declare -i debug=0 sit_classfile="" # sit class file to be installed sit_action="all" # sit action to be performed @@ -99,8 +99,10 @@ sit_info "Sit class file(s): $sit_classfile" # compiler to use # (gnu|intel|pgi) COMPILER=${COMPILER:=${DEFAULT_COMPILER}} +sit_info_verbose "Compiler: $COMPILER" # use specific compiler version COMPILER_VERSION=${COMPILER_VERSION:=} +sit_info_verbose "Compiler version: $COMPILER_VERSION" # Compiler specifications