[Asterisk-code-review] pretty print: Add another test for TERM (testsuite[certified/13.21])

George Joseph asteriskteam at digium.com
Thu Jul 12 07:38:14 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/9406 )

Change subject: pretty_print: Add another test for TERM
......................................................................

pretty_print: Add another test for TERM

Change-Id: I8a6fae6b005b952a41b00cd98c89ab5acce6bb02
---
M contrib/scripts/pretty_print
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/contrib/scripts/pretty_print b/contrib/scripts/pretty_print
index b50f87d..8528eb9 100755
--- a/contrib/scripts/pretty_print
+++ b/contrib/scripts/pretty_print
@@ -53,7 +53,10 @@
 	esac
 done
 
-if [ x"$TERM" = x ] ; then
+tput longname 2&>/dev/null
+noterm=$?
+
+if [ $noterm -ne 0 -o x"$TERM" = x -o "$TERM" = "unknown" ] ; then
 	NO_TIMER=1
 	NO_COLOR=1
 	if [ $TERM_WIDTH -le 0 ] ; then
@@ -215,4 +218,4 @@
 
 trap - INT ERR
 
-[ $countpid -gt 0 ] && kill $countpid &>/dev/null
+[ ${countpid:-0} -gt 0 ] && kill $countpid &>/dev/null

-- 
To view, visit https://gerrit.asterisk.org/9406
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: certified/13.21
Gerrit-MessageType: merged
Gerrit-Change-Id: I8a6fae6b005b952a41b00cd98c89ab5acce6bb02
Gerrit-Change-Number: 9406
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180712/fddc10a2/attachment-0001.html>


More information about the asterisk-code-review mailing list