- (dtucker) [openbsd-compat/fake-rfc2553.h] rename ssh_gai_strerror hack
[openssh-git.git] / fixpaths
blob60a67990f173e053ed7bdd9da5a11c3d1955937e
1 #!/bin/sh
3 # fixpaths - substitute makefile variables into text files
4 # Usage: fixpaths -Dsomething=somethingelse ...
6 die() {
7 echo $*
8 exit -1
11 test -n "`echo $1|grep -- -D`" || \
12 die $0: nothing to do - no substitutions listed!
14 test -n "`echo $1|grep -- '-D[^=]\+=[^ ]\+'`" || \
15 die $0: error in command line arguments.
17 test -n "`echo $*|grep -- ' [^-]'`" || \
18 die Usage: $0 '[-Dstring=replacement] [[infile] ...]'
20 sed `echo $*|sed -e 's/-D\([^=]\+\)=\([^ ]*\)/-e s=\1=\2=g/g'`
22 exit 0