Code enhancements and textual change

This commit is contained in:
Michael Boelen 2017-10-29 11:26:25 +01:00
parent ebf16462a8
commit e5c11991ef
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 4 additions and 4 deletions

View File

@ -511,7 +511,7 @@
shift shift
done done
if [ "${RESULT}" = "" ]; then if [ -z "${RESULT}" ]; then
RESULTPART="" RESULTPART=""
else else
if [ ${CRONJOB} -eq 0 ]; then if [ ${CRONJOB} -eq 0 ]; then
@ -521,7 +521,7 @@
fi fi
fi fi
if [ ! "${TEXT}" = "" ]; then if [ ! -z "${TEXT}" ]; then
SHOW=0 SHOW=0
if [ ${SHOW_WARNINGS_ONLY} -eq 1 ]; then if [ ${SHOW_WARNINGS_ONLY} -eq 1 ]; then
if [ "${RESULT}" = "WARNING" ]; then SHOW=1; fi if [ "${RESULT}" = "WARNING" ]; then SHOW=1; fi
@ -530,8 +530,8 @@
if [ ${SHOW} -eq 1 ]; then if [ ${SHOW} -eq 1 ]; then
# Display: # Display:
# - counting with -m instead of -c, to support language locale # - for full shells, count with -m instead of -c, to support language locale (older busybox does not have -m)
# - wc needs LANG to deal with multi-bytes characters but LANG has been unset in include/consts... # - wc needs LANG to deal with multi-bytes characters but LANG has been unset in include/consts
LINESIZE=$(export LC_ALL= ; export LANG="${DISPLAY_LANG}";echo "${TEXT}" | wc -m | tr -d ' ') LINESIZE=$(export LC_ALL= ; export LANG="${DISPLAY_LANG}";echo "${TEXT}" | wc -m | tr -d ' ')
if [ ${SHOWDEBUG} -eq 1 ]; then DEBUGTEXT=" [${PURPLE}DEBUG${NORMAL}]"; else DEBUGTEXT=""; fi if [ ${SHOWDEBUG} -eq 1 ]; then DEBUGTEXT=" [${PURPLE}DEBUG${NORMAL}]"; else DEBUGTEXT=""; fi
if [ ${INDENT} -gt 0 ]; then SPACES=$((62 - INDENT - LINESIZE)); fi if [ ${INDENT} -gt 0 ]; then SPACES=$((62 - INDENT - LINESIZE)); fi