Skip to content

Instantly share code, notes, and snippets.

@zbeekman
Last active May 24, 2016 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zbeekman/339a3f07a9f540a37abcaa51aa28c840 to your computer and use it in GitHub Desktop.
Save zbeekman/339a3f07a9f540a37abcaa51aa28c840 to your computer and use it in GitHub Desktop.
s.gsub! regexp help
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++"
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