diff --git a/rake.d/bin/bin2h.rb b/rake.d/bin/bin2h.rb new file mode 100755 index 000000000..3f669dca4 --- /dev/null +++ b/rake.d/bin/bin2h.rb @@ -0,0 +1,31 @@ +#!/usr/bin/env ruby + +if ARGV.size != 2 + puts "Syntax: bin2h.rb source.ext destination.h" + exit 1 +end + +bin_name = File.basename(ARGV[0]).gsub(/[^a-z\d]/i, '_').gsub(/_+/, '_') + '_bin' + +File.open(ARGV[1], "w") do |file| + file.puts <