Add s.get_make_var
This allows more complicated transformations to happen, such as stripping out part of the variable.
This commit is contained in:
parent
e7d7ceccee
commit
e1c9e24920
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user