xenocara/app/xterm/run-tic.sh

28 lines
527 B
Bash
Raw Normal View History

2007-06-15 13:29:55 -06:00
#!/bin/sh
2007-08-25 12:53:27 -06:00
# $XTermId: run-tic.sh,v 1.3 2007/06/17 15:30:03 tom Exp $
2007-06-15 13:29:55 -06:00
#
# Run tic, either using ncurses' extension feature or filtering out harmless
# messages for the extensions which are otherwise ignored by other versions of
# tic.
TMP=run-tic$$.log
VER=`tic -V 2>/dev/null`
OPT=
case .$VER in
.ncurses*)
OPT="-x"
;;
esac
echo "** tic $OPT" "$@"
tic $OPT "$@" 2>$TMP
RET=$?
2007-08-25 12:53:27 -06:00
fgrep -v 'Unknown Capability' $TMP | \
fgrep -v 'Capability is not recognized:' | \
fgrep -v 'tic: Warning near line ' >&2
2007-06-15 13:29:55 -06:00
rm -f $TMP
exit $RET