Bug fix: ./run_all_auto aborted on kojipkgs.fedoraproject.org on tput attempt. Thanks Robert Scheck.

This commit is contained in:
Thomas Schmitt 2017-08-08 09:52:39 +02:00
parent 2cab2102e0
commit d9c93a6dea
2 changed files with 28 additions and 6 deletions

View File

@ -43,12 +43,18 @@ EOF
############################################# #############################################
boldify() { boldify() {
if which tput >/dev/null 2>&1; then tput smso; fi if which tput >/dev/null 2>&1
then
tput smso || dummy_variable=1
fi
} }
############################################# #############################################
unboldify() { unboldify() {
if which tput >/dev/null 2>&1; then tput rmso; fi if which tput >/dev/null 2>&1
then
tput rmso || dummy_variable=1
fi
} }
############################################# #############################################

View File

@ -58,6 +58,22 @@ count_lines()
return 0 return 0
} }
#############################################
# copied from releng/inc/releng_getopts.inc which is not included here.
boldify() {
if which tput >/dev/null 2>&1
then
tput smso || dummy_variable=1
fi
}
unboldify() {
if which tput >/dev/null 2>&1
then
tput rmso || dummy_variable=1
fi
}
############################################# #############################################
print_usage() print_usage()
{ {
@ -162,9 +178,9 @@ fi
*) *)
exit_value=2 exit_value=2
printf "done in ${TS} sec. " printf "done in ${TS} sec. "
which tput >/dev/null 2>&1 && tput smso boldify
printf "FAIL -> EXIT CODE $RET" printf "FAIL -> EXIT CODE $RET"
which tput >/dev/null 2>&1 && tput rmso unboldify
echo echo
;; ;;
esac esac
@ -236,10 +252,10 @@ fi
fi fi
# #
which tput >/dev/null 2>&1 && tput smso boldify
echo # | tee -a ${CLOG} echo # | tee -a ${CLOG}
echo "${SELF}: Leaving the following cruft in ${GEN_DATA_DIR}:" # | tee -a ${CLOG} echo "${SELF}: Leaving the following cruft in ${GEN_DATA_DIR}:" # | tee -a ${CLOG}
which tput >/dev/null 2>&1 && tput rmso unboldify
ls -lth "${GEN_DATA_DIR}" # | tee -a ${CLOG} ls -lth "${GEN_DATA_DIR}" # | tee -a ${CLOG}
# Fin # Fin