summaryrefslogtreecommitdiffstats
path: root/src/util/ss/config_script
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-06-28 18:28:11 +0000
committerTheodore Tso <tytso@mit.edu>1995-06-28 18:28:11 +0000
commit966b47e499faefe16dc615ac4df920f95131db6d (patch)
tree7abe8dfdf5d2406d4a07e24266fe425ed022aadc /src/util/ss/config_script
parentf33c01c4c2c38f1c3ec1e1418ea6e158a6b50b16 (diff)
downloadkrb5-966b47e499faefe16dc615ac4df920f95131db6d.tar.gz
krb5-966b47e499faefe16dc615ac4df920f95131db6d.tar.xz
krb5-966b47e499faefe16dc615ac4df920f95131db6d.zip
Rename ct_c.* to ct_c.*.in. ct_c.sed.in is now processed by sed to
remove comment lines beginning with '#', since some sed programs can't handle that. Change config_script so that the directory where the ct_c.* files can be specified, since those are in the build directory, instead of the source directory. (This is all for the sake of System V sed. Sigh.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6186 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/ss/config_script')
-rw-r--r--src/util/ss/config_script17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/util/ss/config_script b/src/util/ss/config_script
index e3de35c87..5add600ed 100644
--- a/src/util/ss/config_script
+++ b/src/util/ss/config_script
@@ -5,21 +5,24 @@
# @AWK@
# @SED@
#
-# Usage: config_script <filename> [<awk>] [<sed>]
+# Usage: config_script <filename> [<dir>] [<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`
+DIR=$2
+AWK=$3
+SED=$4
+if test "${DIR}x" = "x" ; then
+ DIR=.
+fi
+DIR=`cd ${DIR}; 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