diff options
| author | Theodore Tso <tytso@mit.edu> | 1993-06-03 12:31:48 +0000 |
|---|---|---|
| committer | Theodore Tso <tytso@mit.edu> | 1993-06-03 12:31:48 +0000 |
| commit | acbed92e113f54d33789d427e697a23a0f07ab64 (patch) | |
| tree | 164a1dbc44306b6d896eb46165623e44223c37a9 /src/util/et/config_script | |
| parent | df53bcea92bd141193e4d63cd1cccdab138579b7 (diff) | |
| download | krb5-acbed92e113f54d33789d427e697a23a0f07ab64.tar.gz krb5-acbed92e113f54d33789d427e697a23a0f07ab64.tar.xz krb5-acbed92e113f54d33789d427e697a23a0f07ab64.zip | |
Initial revision
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2610 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/et/config_script')
| -rw-r--r-- | src/util/et/config_script | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/util/et/config_script b/src/util/et/config_script new file mode 100644 index 000000000..e3de35c87 --- /dev/null +++ b/src/util/et/config_script @@ -0,0 +1,25 @@ +#!/bin/sh +# +# This program takes a shell script and configures for the following +# variables: @DIR@ +# @AWK@ +# @SED@ +# +# Usage: config_script <filename> [<awk>] [<sed>] +# + +FILE=$1 +AWK=$2 +SED=$3 + +# Grr.... not all Unix's have the dirname command +TMP=`echo $1 | sed -e 's;[^/]*$;;' -e 's/^$/./'` +DIR=`cd ${TMP}; pwd` + +if test "${AWK}x" = "x" ; then + AWK=awk +fi +if test "${SED}x" = "x" ; then + SED=sed +fi +sed -e "s;@DIR@;${DIR};" -e "s;@AWK@;${AWK};" -e "s;@SED@;${SED};" $FILE |
