2 # $Id: edit_cfg.sh,v 1.6 1997/04/06 01:54:44 tom Exp $
3 ################################################################################
4 # Copyright 1996,1997 by Thomas E. Dickey <dickey@clark.net> #
5 # All Rights Reserved. #
7 # Permission to use, copy, modify, and distribute this software and its #
8 # documentation for any purpose and without fee is hereby granted, provided #
9 # that the above copyright notice appear in all copies and that both that #
10 # copyright notice and this permission notice appear in supporting #
11 # documentation, and that the name of the above listed copyright holder(s) not #
12 # be used in advertising or publicity pertaining to distribution of the #
13 # software without specific, written prior permission. THE ABOVE LISTED #
14 # COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, #
15 # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT #
16 # SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY SPECIAL, #
17 # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM #
18 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE #
19 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR #
20 # PERFORMANCE OF THIS SOFTWARE. #
21 ################################################################################
22 # Edit the default value of the term.h file based on the autoconf-generated
35 if ( grep "[ ]$name[ ]" $1 2>&1 >/dev/null )
37 sed -e 's/define '$name'.*$/define '$name' 1/' $2.bak >$2
39 sed -e 's/define '$name'.*$/define '$name' 0/' $2.bak >$2