Do not show text on screen in quiet mode

This commit is contained in:
mboelen 2016-04-25 11:13:27 +02:00
parent 22cb6d6523
commit bedadd9cd1
1 changed files with 14 additions and 11 deletions

View File

@ -1396,6 +1396,7 @@
fi fi
} }
################################################################################ ################################################################################
# Name : Progress() # Name : Progress()
# Description : Displays progress on screen with dots # Description : Displays progress on screen with dots
@ -1404,21 +1405,23 @@
# Tip : Use this function from Register with the --progress parameter # Tip : Use this function from Register with the --progress parameter
################################################################################ ################################################################################
Progress() Progress() {
{
if [ ${CRONJOB} -eq 0 ]; then if [ ${CRONJOB} -eq 0 ]; then
if [ "$1" = "--finish" ]; then if [ ${QUIET} -eq 0 ]; then
${ECHOCMD} "" if [ "$1" = "--finish" ]; then
else ${ECHOCMD} ""
# If the No-Break version of echo is known, use that (usually breaks in combination with -e) else
if [ ! "${ECHONB}" = "" ]; then # If the No-Break version of echo is known, use that (usually breaks in combination with -e)
${ECHONB} "$1" if [ ! "${ECHONB}" = "" ]; then
else ${ECHONB} "$1"
${ECHOCMD} -en "$1" else
${ECHOCMD} -en "$1"
fi
fi fi
fi fi
fi fi
} }
################################################################################ ################################################################################
# Name : Progress() # Name : Progress()