parent
ae49b06600
commit
5f41016267
@ -79,8 +79,8 @@ class Keg
|
||||
end
|
||||
relocation.add_replacement_pair(:library, HOMEBREW_LIBRARY.to_s, LIBRARY_PLACEHOLDER)
|
||||
relocation.add_replacement_pair(:perl,
|
||||
%r{\A#!(/usr/bin/perl\d\.\d+|#{HOMEBREW_PREFIX}/opt/perl/bin/perl)$}o,
|
||||
"#!#{PERL_PLACEHOLDER}")
|
||||
%r{\A#!(?:/usr/bin/perl\d\.\d+|#{HOMEBREW_PREFIX}/opt/perl/bin/perl)( |$)}o,
|
||||
"#!#{PERL_PLACEHOLDER}\\1")
|
||||
relocation
|
||||
end
|
||||
alias generic_prepare_relocation_to_placeholders prepare_relocation_to_placeholders
|
||||
|
@ -20,9 +20,9 @@ module Language
|
||||
end
|
||||
|
||||
Utils::Shebang::RewriteInfo.new(
|
||||
%r{^#! ?/usr/bin/(env )?perl$},
|
||||
20, # the length of "#! /usr/bin/env perl"
|
||||
perl_path,
|
||||
%r{^#! ?/usr/bin/(?:env )?perl( |$)},
|
||||
21, # the length of "#! /usr/bin/env perl "
|
||||
"#{perl_path}\\1",
|
||||
)
|
||||
end
|
||||
end
|
||||
|
@ -96,9 +96,9 @@ module Language
|
||||
# @private
|
||||
def python_shebang_rewrite_info(python_path)
|
||||
Utils::Shebang::RewriteInfo.new(
|
||||
%r{^#! ?/usr/bin/(env )?python([23](\.\d{1,2})?)?$},
|
||||
28, # the length of "#! /usr/bin/env pythonx.yyy$"
|
||||
python_path,
|
||||
%r{^#! ?/usr/bin/(?:env )?python(?:[23](?:\.\d{1,2})?)?( |$)},
|
||||
28, # the length of "#! /usr/bin/env pythonx.yyy "
|
||||
"#{python_path}\\1",
|
||||
)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user