summaryrefslogtreecommitdiffstats
path: root/src/util/ss/config_script
diff options
context:
space:
mode:
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