Sha256: 8218194bb4420867124d28200649f12fc2919fd0529fc0c81709e1a73e4dc74c
Contents?: true
Size: 546 Bytes
Versions: 35
Compression:
Stored size: 546 Bytes
Contents
require 'fileutils' require 'find' def process(file) puts "Post-processing #{file}" File.open(file) do |input| File.open("#{file}.pp", "w") do |output| input.each_line do |line| yield output, line end end end FileUtils.mv("#{file}.pp", "#{file}") end process("configure") do |out, line| # autoconf doesn't properly enclose $srcdir and $am_aux_dir in quotes line.gsub!(/([^"'])(\$srcdir)/, '\1"\2"') line.gsub!(/([^"'])(\$am_aux_dir)/, '\1\"\2\"') out.puts line end FileUtils.chmod(0700, "configure")
Version data entries
35 entries across 35 versions & 6 rubygems