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
#!/usr/bin/env ruby | |
# Your umbrella header needs a comment in it like the below so this script | |
# knows which parts to replace | |
# | |
# /* IMPORTS BEGIN */ | |
# | |
# /* IMPORTS END */ | |
MODULE = ARGV[0] || File.basename(Dir.getwd) |
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
#!/usr/bin/env ruby | |
module_headers = Dir.glob("**/*.h").map {|f| File.basename(f) } | |
bridging_header = File.read(ARGV[0]) | |
output_header = "" | |
bridging_header.lines.each do |l| | |
if match = l.match(/#import\s*"(.*)"/) | |
header = match.captures[0] | |
if module_headers.include?(header) |