blob: 152e1cd8fb9322ee175631ff61a0821b9538eca6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/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
|