From: Reuben Thomas <rrt@sc3d.org> Date: Wed, 27 May 2009 22:25:48 +0000 (+0000) Subject: Add full range of hash-bang tests for python and ruby. X-Git-Tag: FILE5_04~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24b6f41bf1df0fe3674b258b501f6f4085022b92;p=file Add full range of hash-bang tests for python and ruby. --- diff --git a/magic/Magdir/python b/magic/Magdir/python index 4803203d..07a6ef2d 100644 --- a/magic/Magdir/python +++ b/magic/Magdir/python @@ -1,4 +1,3 @@ - #------------------------------------------------------------------------------ # python: file(1) magic for python # @@ -17,5 +16,11 @@ 0 belong 0xd1f20d0a python 2.6 byte-compiled -0 string/b #!\ /usr/bin/python python script text executable - +0 search/1/b #!\ /usr/bin/python Python script text executable +!:mime text/x-python +0 search/1/b #!\ /usr/local/bin/python Python script text executable +!:mime text/x-python +0 search/1 #!/usr/bin/env\ python Python script text executable +!:mime text/x-python +0 search/1 #!\ /usr/bin/env\ ruby Python script text executable +!:mime text/x-python diff --git a/magic/Magdir/ruby b/magic/Magdir/ruby index de6f2a09..3bc7dfe8 100644 --- a/magic/Magdir/ruby +++ b/magic/Magdir/ruby @@ -1,10 +1,14 @@ #------------------------------------------------------------------------------ -# ruby: file(1) magic for Lua scripting language +# ruby: file(1) magic for Ruby scripting language # URL: http://www.ruby-lang.org/ # From: Reuben Thomas <rrt@sc3d.org> # Ruby scripts 0 search/1/b #!\ /usr/bin/ruby Ruby script text executable +!:mime text/x-ruby 0 search/1/b #!\ /usr/local/bin/ruby Ruby script text executable +!:mime text/x-ruby 0 search/1 #!/usr/bin/env\ ruby Ruby script text executable +!:mime text/x-ruby 0 search/1 #!\ /usr/bin/env\ ruby Ruby script text executable +!:mime text/x-ruby