From: Reuben Thomas Date: Mon, 5 Dec 2011 23:14:02 +0000 (+0000) Subject: Move generic /usr/bin/env script detection from commands to X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e14c2a62a2bad8fbb0906eba17cf2d7f1ef9036;p=file Move generic /usr/bin/env script detection from commands to varied.script, so all the generic detection is together. Reduce its strength so it doesn't outweigh language-specific tests. --- diff --git a/magic/Magdir/commands b/magic/Magdir/commands index caba6541..4fb151f3 100644 --- a/magic/Magdir/commands +++ b/magic/Magdir/commands @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: commands,v 1.41 2011/05/02 12:36:41 christos Exp $ +# $File: commands,v 1.42 2011/12/05 23:14:02 rrt Exp $ # commands: file(1) magic for various shells and interpreters # #0 string/w : shell archive or script for antique kernel text @@ -64,12 +64,6 @@ 0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text executable !:mime text/x-shellscript -# using env -0 string/t #!/usr/bin/env a ->15 string/t >\0 %s script text executable -0 string/t #!\ /usr/bin/env a ->16 string/t >\0 %s script text executable - # PHP scripts # Ulf Harnhammar 0 search/1/c =3 string >\0 %s script text executable +!:strength / 2 0 string/t #!\t/ a >3 string >\0 %s script text executable +!:strength / 2 0 string/t #!/ a >2 string >\0 %s script text executable +!:strength / 2 0 string/t #!\ script text executable >3 string >\0 for %s +!:strength / 3 + +# using env +0 string/t #!/usr/bin/env a +>15 string/t >\0 %s script text executable +!:strength / 2 +0 string/t #!\ /usr/bin/env a +>16 string/t >\0 %s script text executable +!:strength / 2 # From: arno # mozilla xpconnect typelib