Created
May 6, 2015 14:34
-
-
Save pietbrauer/82b287e30592ef1f194b to your computer and use it in GitHub Desktop.
Script to change the Xcode location in a module map file
This file contains hidden or 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
#!/usr/bin/ruby | |
Dir['CommonCrypto/*.modulemap'].each do |file_name| | |
text = File.read(file_name) | |
path = `xcode-select -p`.strip << "/" | |
new_contents = text.gsub(/\/Applications\/Xcode.app\/Contents\/Developer\//, path) | |
File.open(file_name, "w") {|file| file.puts new_contents } | |
end |
This file contains hidden or 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
module CommonCrypto [system] { | |
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/CommonCrypto/CommonCrypto.h" | |
export * | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment