Skip to content

Instantly share code, notes, and snippets.

@n-shinya
Created December 12, 2012 02:30
Show Gist options
  • Save n-shinya/4264356 to your computer and use it in GitHub Desktop.
Save n-shinya/4264356 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
dirs = Dir.glob("build_*")
dirs.each do |dir|
config = dir + "/config.xml"
begin
file_r = File.open(config, "r")
buffer = file_r.read
buffer.gsub!("<mavenName>Maven 2.2.1", "<mavenName>2.2.1")
file_w = File.open(config, "w")
file_w.write(buffer)
ensure
file_r.close
file_w.close
end
end
@n-shinya
Copy link
Author

習作。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment