Bug#463193: checkbashisms: script $filename does not appear to be a /bin/sh script on csh scripts and others
On 30/01/2008, Adam D. Barratt [EMAIL PROTECTED] wrote: Hi, Raphael Geissert wrote, Wednesday, January 30, 2008 3:07 AM On scripts with a /bin/csh shebang and other scripts with a non /bin/{sh,ash,dash} shebang checkscripts quits without processing them. The portion of code is: elsif ($interpreter !~ m,/(sh|ash|dash)$,) { It should instead use something like: elsif ($interpreter !~ m,/[a-z]*(sh)$,) { I have to agree with Peter here. By definition, a bashism is the use of a bash-specific feature in a script that is written according to the structure and grammar defined in POSIX/SUS/XSI, without that script being marked with a bash shebang. Attempting to check for bashisms in scripts that don't implement that language doesn't make sense. One could argue that the check should support ksh, although I seem to remember that most bashisms are also kshisms. Ack. But at least posh's description says: posh is a stripped-down version of pdksh that aims for compliance with Debian's policy, and few extra features. . WARNING: Since many of Debian's /bin/sh scripts are not actually policy-compliant, using posh as your /bin/sh may reveal breakage. So it might worth to be added to the list. Adam By the way, sorry for the late response. Cheers, -- Atomo64 - Raphael Please avoid sending me Word, PowerPoint or Excel attachments. See http://www.gnu.org/philosophy/no-word-attachments.html Say NO to Microsoft Office broken standard. See http://www.noooxml.org/petition -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#463193: checkbashisms: script $filename does not appear to be a /bin/sh script on csh scripts and others
Hi, Raphael Geissert wrote, Wednesday, January 30, 2008 3:07 AM On scripts with a /bin/csh shebang and other scripts with a non /bin/{sh,ash,dash} shebang checkscripts quits without processing them. The portion of code is: elsif ($interpreter !~ m,/(sh|ash|dash)$,) { It should instead use something like: elsif ($interpreter !~ m,/[a-z]*(sh)$,) { I have to agree with Peter here. By definition, a bashism is the use of a bash-specific feature in a script that is written according to the structure and grammar defined in POSIX/SUS/XSI, without that script being marked with a bash shebang. Attempting to check for bashisms in scripts that don't implement that language doesn't make sense. One could argue that the check should support ksh, although I seem to remember that most bashisms are also kshisms. Adam -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#463193: checkbashisms: script $filename does not appear to be a /bin/sh script on csh scripts and others
Package: devscripts Version: 2.10.13 User: [EMAIL PROTECTED] Usertags: checkbashisms On scripts with a /bin/csh shebang and other scripts with a non /bin/{sh,ash,dash} shebang checkscripts quits without processing them. The portion of code is: elsif ($interpreter !~ m,/(sh|ash|dash)$,) { It should instead use something like: elsif ($interpreter !~ m,/[a-z]*(sh)$,) { Kind regards, -- Atomo64 - Raphael Please avoid sending me Word, PowerPoint or Excel attachments. See http://www.gnu.org/philosophy/no-word-attachments.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#463193: checkbashisms: script $filename does not appear to be a /bin/sh script on csh scripts and others
[Raphael Geissert] On scripts with a /bin/csh shebang and other scripts with a non /bin/{sh,ash,dash} shebang checkscripts quits without processing them. Errr ... what? Checking a csh script for bashisms is like checking a Python program for bashisms. The syntax just isn't similar enough for such a thing to be very meaningful. -- Peter Samuelson | org-tld!p12n!peter | http://p12n.org/ signature.asc Description: Digital signature