Adam D. Barratt wrote: > On Thu, 2009-07-09 at 09:58 -0700, Russ Allbery wrote: >> Stefan Fritsch <[email protected]> writes: >> > chmod `dpkg-statoverride --list /usr/sbin/apache2 | cut -f 3` >> > /usr/sbin/apache2 >> >> This is a bug in $LEADIN that causes it to catch things immediately >> after the *closing* backtick in a backtick expression. This will also >> affect checkbashisms in devscripts. >> >> I think the fix is to change: >> >> our $LEADIN = qr'(?:(?:^|[`&;(|{])\s*|(?:if|then|do|while)\s+)'; >> >> to: >> >> our $LEADIN = >> qr'(?:(?:^|[&;(|{]|^[^`]*`)\s*|(?:if|then|do|while)\s+)'; >> >> but I'm not sure and could use more review. > > I can't find any obvious issues with it from a few tests, fwiw. >
I can. $ cat /tmp/prove #!/bin/sh true `basename "$0"` `echo -e "foo\nbar"` (suppose true is some other program) Original checkbashisms: $ checkbashisms /tmp/prove possible bashism in /tmp/prove line 2 (echo -e): true `basename "$0"` `echo -e "foo\nbar"` checkbashisms with new $LEADIN: $ checkbashisms /tmp/prove (nothing) Cheers, -- Raphael Geissert - Debian Developer www.debian.org - get.debian.net -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

