diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-01-12 16:37:49 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-01-12 16:37:49 +0000 |
commit | 0f3b0d4771a006aa1e12d5c867fdb62d63d0feac (patch) | |
tree | 70222fa260bdb8335aad2a6e467e67c85b94f8dd /share/termtypes | |
parent | 7dcefe83819f0d8ae536af305facd310ac25ba03 (diff) |
Hack to detect termcap/terminfo files that just contain a usage string.
This is needed because, until 5 minutes ago, tic prints its usage()
to stdout and not stderr so the zero-length termcap check doesn't help
us here. This hack should be removed after OpenBSD 2.7 is released.
Diffstat (limited to 'share/termtypes')
-rw-r--r-- | share/termtypes/Makefile | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/share/termtypes/Makefile b/share/termtypes/Makefile index 59ac2832d73..080581b1c5f 100644 --- a/share/termtypes/Makefile +++ b/share/termtypes/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.12 2000/01/09 06:02:42 millert Exp $ +# $OpenBSD: Makefile,v 1.13 2000/01/12 16:37:48 millert Exp $ # # Take termcap/terminfo master file and generate termcap/terminfo .db files # master: http://www.tuxedo.org/~esr/terminfo/termtypes.master.gz @@ -15,7 +15,13 @@ terminfo.src: termtypes.master > ${.TARGET} @if [ ! -s ${.TARGET} ]; then \ echo ${.TARGET} is zero length! You need to update /usr/bin/tic ;\ + rm -f ${.TARGET} ;\ exit 1 ;\ + else case `sed 1q ${.TARGET}` in \ + Usage*) echo ${.TARGET} is corrupt! You need to update /usr/bin/tic ;\ + rm -f ${.TARGET} ;\ + exit 1 ;;\ + esac ;\ fi terminfo.db: terminfo.src @@ -28,7 +34,13 @@ termcap.src: termtypes.master > ${.TARGET} @if [ ! -s ${.TARGET} ]; then \ echo ${.TARGET} is zero length! You need to update /usr/bin/tic ;\ + rm -f ${.TARGET} ;\ exit 1 ;\ + else case `sed 1q ${.TARGET}` in \ + Usage*) echo ${.TARGET} is corrupt! You need to update /usr/bin/tic ;\ + rm -f ${.TARGET} ;\ + exit 1 ;;\ + esac ;\ fi termcap.db: termcap.src |