]> 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 caba6541372ec5ceb2605f5efc8affef60af3ef0..4fb151f32927230b091a22e1f948e3e47a1b90d5 100644 (file)
@@ -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
 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 1f5eee58cb56559e887666e5d49df0626110d1e1..137a7c2f32aad6764f8ba82de255baff33c0e17b 100644 (file)
@@ -1,16 +1,28 @@
 
 #------------------------------------------------------------------------------
-# $File: varied.script,v 1.7 2010/11/25 15:00:12 christos Exp $
+# $File: varied.script,v 1.8 2011/12/05 23:14:02 rrt 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