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 "${DIR}x" = "x" ; then 17*7f2fe78bSCy Schubert DIR=. 18*7f2fe78bSCy Schubertfi 19*7f2fe78bSCy SchubertDIR=`cd ${DIR}; pwd` 20*7f2fe78bSCy Schubertif test "${AWK}x" = "x" ; then 21*7f2fe78bSCy Schubert AWK=awk 22*7f2fe78bSCy Schubertfi 23*7f2fe78bSCy Schubertif test "${SED}x" = "x" ; then 24*7f2fe78bSCy Schubert SED=sed 25*7f2fe78bSCy Schubertfi 26*7f2fe78bSCy Schubert 27*7f2fe78bSCy Schubert 28*7f2fe78bSCy Schubertsed -e "s;@DIR@;${DIR};" -e "s;@AWK@;${AWK};" -e "s;@SED@;${SED};" $FILE 29