]> granicus.if.org Git - file/commitdiff
Move generic /usr/bin/env script detection from commands to
authorReuben Thomas <rrt@sc3d.org>
Mon, 5 Dec 2011 23:14:02 +0000 (23:14 +0000)
committerReuben Thomas <rrt@sc3d.org>
Mon, 5 Dec 2011 23:14:02 +0000 (23:14 +0000)
varied.script, so all the generic detection is together.

Reduce its strength so it doesn't outweigh language-specific tests.

magic/Magdir/commands
magic/Magdir/varied.script

index f333a0b5d791ce83e71306e47d993eb79953af38..ba9fa95dd8f85231a76d640023bcf30f2fd17699 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: commands,v 1.40 2011/04/20 19:00:07 christos Exp $
+# $File: commands,v 1.41 2011/05/02 12:36:41 christos Exp $
 # commands:  file(1) magic for various shells and interpreters
 #
 #0     string/w        :                       shell archive or script for antique kernel text
 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 <ulfh@update.uu.se>
 0      search/1/c      =<?php                  PHP script text
index a8eb334929ad7947d5f396b6c0c4d2ae9d86c66c..5ed130d53a8ac97dbccbf34ed2d723e3a3783e96 100644 (file)
@@ -1,16 +1,28 @@
 
 #------------------------------------------------------------------------------
-# $File: varied.script,v 1.6 2009/09/19 16:28:13 christos Exp $
+# $File: varied.script,v 1.7 2010/11/25 15:00:12 christos Exp $
 # varied.script:  file(1) magic for various interpreter scripts
 
 0      string/t                #!\ /                   a
 >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 <arenevier@fdn.fr>
 # mozilla xpconnect typelib