xref: /freebsd/crypto/krb5/src/util/et/config_script (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1*7f2fe78bSCy Schubert#!/bin/sh
2*7f2fe78bSCy Schubert#
3*7f2fe78bSCy Schubert# This program takes a shell script and configures for the following
4*7f2fe78bSCy Schubert# variables:	@DIR@
5*7f2fe78bSCy Schubert#		@AWK@
6*7f2fe78bSCy Schubert#		@SED@
7*7f2fe78bSCy Schubert#
8*7f2fe78bSCy Schubert# Usage: config_script <filename> [<dir>] [<awk>] [<sed>]
9*7f2fe78bSCy Schubert#
10*7f2fe78bSCy Schubert
11*7f2fe78bSCy SchubertFILE=$1
12*7f2fe78bSCy SchubertDIR=$2
13*7f2fe78bSCy SchubertAWK=$3
14*7f2fe78bSCy SchubertSED=$4
15*7f2fe78bSCy Schubert
16*7f2fe78bSCy Schubertif test "${AWK}x" = "x" ; then
17*7f2fe78bSCy Schubert	AWK=awk
18*7f2fe78bSCy Schubertfi
19*7f2fe78bSCy Schubertif test "${SED}x" = "x" ; then
20*7f2fe78bSCy Schubert	SED=sed
21*7f2fe78bSCy Schubertfi
22*7f2fe78bSCy Schubertsed -e "s;@DIR@;${DIR};" -e "s;@AWK@;${AWK};" -e "s;@SED@;${SED};" $FILE
23