diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/utils.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 088aea195..a0ec97af6 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -167,6 +167,12 @@ module HomebrewInreplaceExtension gsub! Regexp.new("^#{flag}[ \\t]*=(.*)$\n?"), "" end end + # Finds the specified variable + def get_make_var flag + m = match Regexp.new("^#{flag}[ \\t]*=[ \\t]*(.*)$") + return m[1] if m + return nil + end end def inreplace path, before=nil, after=nil |
