Revision 22570,
499 bytes
checked in by ghudson, 18 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r22569,
which included commits to RCS files with non-trunk default branches.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # fixpaths - substitute makefile variables into text files |
---|
4 | # Usage: fixpaths -Dsomething=somethingelse ... |
---|
5 | |
---|
6 | die() { |
---|
7 | echo $* |
---|
8 | exit -1 |
---|
9 | } |
---|
10 | |
---|
11 | test -n "`echo $1|grep -- -D`" || \ |
---|
12 | die $0: nothing to do - no substitutions listed! |
---|
13 | |
---|
14 | test -n "`echo $1|grep -- '-D[^=]\+=[^ ]\+'`" || \ |
---|
15 | die $0: error in command line arguments. |
---|
16 | |
---|
17 | test -n "`echo $*|grep -- ' [^-]'`" || \ |
---|
18 | die Usage: $0 '[-Dstring=replacement] [[infile] ...]' |
---|
19 | |
---|
20 | sed `echo $*|sed -e 's/-D\([^=]\+\)=\([^ ]*\)/-e s=\1=\2=g/g'` |
---|
21 | |
---|
22 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.