diff options
Diffstat (limited to 'contrib/ncurses/ncurses/tinfo/MKfallback.sh')
-rwxr-xr-x | contrib/ncurses/ncurses/tinfo/MKfallback.sh | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/contrib/ncurses/ncurses/tinfo/MKfallback.sh b/contrib/ncurses/ncurses/tinfo/MKfallback.sh index de3e23a..d1abcd2 100755 --- a/contrib/ncurses/ncurses/tinfo/MKfallback.sh +++ b/contrib/ncurses/ncurses/tinfo/MKfallback.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: MKfallback.sh,v 1.10 2000/12/10 00:14:39 tom Exp $ +# $Id: MKfallback.sh,v 1.11 2001/12/02 01:55:30 tom Exp $ # # MKfallback.sh -- create fallback table for entry reads # @@ -8,6 +8,28 @@ # from an on-disk terminfo tree) tries to match the type with one of a # specified list of types generated in. # + +terminfo_dir=$1 +shift + +terminfo_src=$1 +shift + +if test $# != 0 ; then + tmp_info=tmp_info + echo creating temporary terminfo directory... >&2 + + TERMINFO=`pwd`/$tmp_info + export TERMINFO + + TERMINFO_DIRS=$TERMINFO:$terminfo_dir + export TERMINFO_DIRS + + tic $terminfo_src >&2 +else + tmp_info= +fi + cat <<EOF /* * DO NOT EDIT THIS FILE BY HAND! It is generated by MKfallback.sh. @@ -73,3 +95,8 @@ cat <<EOF return((TERMTYPE *)0); } EOF + +if test -n "$tmp_info" ; then + echo removing temporary terminfo directory... >&2 + rm -rf $tmp_info +fi |