I’m working on a new formular but I’m not sure how to solve the following. Currently, my install method looks like this:
def install system "./configure" system "make" bin.install "build.fn/x86_64-darwin-LLVM-9.1.0-debug/scc" end
As you can probably tell, the path changes with different versions of LLVM, the same might be true for the suffix of the build folder (will test this at home).
My first idea was to read the version printed out by
clang, but this is what the output looks like:
$ clang --version
Apple LLVM version 9.1.0 (clang-902.0.39.1)
Thread model: posix
Should I use Regex to get the version and if so, does Homebrew provide a method for this or should I just to with
match()? Or is there an even better way I haven’t thought of yet? If it helps: there aren’t any other files or folders inside the build folder.