summaryrefslogtreecommitdiffstats
path: root/src/util/ss/config_script
blob: 5add600ede1cc81cdb14d08fb8e63dfc738ea89d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#
# This program takes a shell script and configures for the following
# variables:	@DIR@
#		@AWK@
#		@SED@
#
# Usage: config_script <filename> [<dir>] [<awk>] [<sed>]
#

FILE=$1
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