]> andersk Git - gssapi-openssh.git/blame - openssh/fixpaths
OPENSSH_4_5P1_20070215 merged to GPT branch
[gssapi-openssh.git] / openssh / fixpaths
CommitLineData
1c14df9e 1#!/bin/sh
3c0ef626 2#
3# fixpaths - substitute makefile variables into text files
1c14df9e 4# Usage: fixpaths -Dsomething=somethingelse ...
3c0ef626 5
1c14df9e 6die() {
7 echo $*
8 exit -1
3c0ef626 9}
10
1c14df9e 11test -n "`echo $1|grep -- -D`" || \
12 die $0: nothing to do - no substitutions listed!
13
14test -n "`echo $1|grep -- '-D[^=]\+=[^ ]\+'`" || \
15 die $0: error in command line arguments.
3c0ef626 16
1c14df9e 17test -n "`echo $*|grep -- ' [^-]'`" || \
18 die Usage: $0 '[-Dstring=replacement] [[infile] ...]'
3c0ef626 19
1c14df9e 20sed `echo $*|sed -e 's/-D\([^=]\+\)=\([^ ]*\)/-e s=\1=\2=g/g'`
3c0ef626 21
1c14df9e 22exit 0
This page took 0.062562 seconds and 5 git commands to generate.