Building without perl
Peter Stuge
stuge-openssh-unix-dev at cdy.org
Fri Dec 6 12:49:24 EST 2002
On Thu, Dec 05, 2002 at 04:04:20PM -0800, Tim Rice wrote:
> > > Breaks SCO.
> >
> > Can you be more specific?
>
> Peter and I have been working on it. I think he has a working version
> now (works on SCO) but I want to test on my other platforms before
> commiting.
>
> I also checked the archives and found
> http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=97590463728438&w=2
>
> Seems like it may be more robust.
Yeah, it's a lot simpler too. I didn't find this while searching.
My original fixpaths had problems with regex syntaxes (various grep and sed
disagree on whether to want \+ or +, solution was to replace with \{1,\})
and sh:s disliking exit -1, an updated version of fixpaths is attached,
although the Makefile.in change is probably better, as it eliminates the
need for a separate file all together - unless there's some specific reason
to have one. This new fixpaths also corrects a bug where the old version
would not allow a substitution to be blank. (-Dblah= file)
//Peter
-------------- next part --------------
#!/bin/sh
#
# fixpaths - substitute makefile variables into text files
die() {
echo $*
exit 255
}
test -n "`echo $1|egrep '\-D'`" || die $0: nothing to do - no substitutions listed!
test -n "`echo $1|egrep '\-D[^=]+=[^ ]*'`" || die $0: error in command line arguments.
test -n "`echo $*|egrep ' [^-]'`" || die Usage: $0 '[-Dstring=replacement] [[infile] ...]'
sed `echo $*|sed -e 's/-D\([^=]\{1,\}=[^ ]*\)/-e s=\1=g/g'`
exit 0
More information about the openssh-unix-dev
mailing list