Last active
May 24, 2016 18:54
-
-
Save zbeekman/339a3f07a9f540a37abcaa51aa28c840 to your computer and use it in GitHub Desktop.
s.gsub! regexp help
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: inreplace failed | |
/usr/local/homebrew/Cellar/gasnet/1.26.0/include/gasnet_tools-par.mak: | |
expected replacement of /\/usr\/local\/homebrew\/Library\/ENV\/4\.3\/clang\+\+/ with "clang++" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir["#{include}/*.mak","#{include}/*-conduit/*.mak"].each do |file| | |
inreplace file do |s| | |
s.gsub! /#{Regexp.escape(HOMEBREW_LIBRARY)}\/ENV\/[0-9.]+\/#{Regexp.escape(ENV.cc)}/, ENV.cc | |
s.gsub! /#{Regexp.escape(HOMEBREW_LIBRARY)}\/ENV\/[0-9.]+\/#{Regexp.escape(ENV.cxx)}/, ENV.cxx | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment