[mythtv] Ticket #7010: ./cpsvndir causes errors with checkinstall for themes

Janne Grunau janne-mythtv at grunau.be
Tue Sep 8 18:12:18 UTC 2009


On Tue, Sep 08, 2009 at 12:44:31PM -0400, Michael T. Dean wrote:
> On 09/08/2009 01:07 AM, David Engel wrote:
> > On Mon, Sep 07, 2009 at 09:24:52PM -0400, Michael T. Dean wrote:
> >   
> >> Also, $(<command>) is a bashism that should be, i.e.:
> >>
> >> for directory in `find "$1" -path '*/.svn' -prune -or -type d -print`; do
> >>
> >> (though I think that one works on dash).
> >>     
> > I know $(command) is definitely standard POSIX.  Furthermore, dash
> > accepts it so this isn't it.
> >   
> 
> Yeah, it turns out that's marked because--though it's supported by most 
> modern shells--it doesn't work on Solaris/IRIX /bin/sh.
> 
> I probably should have said, "non-portable," rather than, "bashism."

doesn't matter: configure already requires posix shell

> " some systems (HP?) have as their /bin/sh a (link to) Korn shell
> " (ie. Posix compliant shell).  /bin/ksh should work for those
> " systems too, however, so the following syntax will flag $(..) as
> " an Error under /bin/sh.  By consensus of vimdev'ers!
> 
> >> Unfortunately, I don't know how to do the bash regexp-type stuff:
> >>
> >> ${1##*/}
> >>
> >> without bash.  I think these are causing some problems on dash.
> >>     
> > That's standard POSIX, too.  dash also accepts it.
> >   
> 
> That and all of the parameter expansion with # in them are marked in the 
> syntax file to work only for bash or korn shell:

but it is posix shell. see
http://opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
2.6.2 Parameter Expansion

> >> If you open up the file in a vim with a sh syntax file and
> >> highlighting enabled, you'll see all the bashism's (or, at least,
> >> non-standard sh syntax) marked in "error" color (red on mine).
> >>     
> > The culprit is the ${var/#Pattern/Replacement} replacement.
> 
> And that is marked bash only:

which is true.


More information about the mythtv-dev mailing list