#!/bin/sh # maketext: sed wrapper to substitute names in scripts and man pages # writes to standard output # get other variables from command line expr= for arg in "$@" do case "$arg" in -debug) debug=true ;; @MAN@=*) arg=`echo $arg | sed -e "s/\.\(.\)/(\1),/g" -e "s/, *$//"` expr="$expr -e 's=$arg='" ;; *=*) expr="$expr -e 's=$arg='" ;; *) if test "$debug" = "true" then echo "sed $expr $arg" 1>&2 fi eval sed $expr $arg ;; esac shift done