17 lines
361 B
Ruby
Executable file
17 lines
361 B
Ruby
Executable file
#!/usr/bin/env ruby1.8
|
|
|
|
files = Dir[File.dirname($0) + "/*.glade"]
|
|
|
|
files.each do |path|
|
|
lines = IO.readlines(path)
|
|
File.rename(path, path + ".tmp")
|
|
|
|
fw = File.new(path, "w");
|
|
|
|
lines.each do |line|
|
|
line = line.sub(/<property name=\"(pixbuf|icon)\">([^\/]+?<\/property>)/, '<property name="\1">../pixmaps/\2')
|
|
fw.puts(line)
|
|
end
|
|
|
|
fw.close
|
|
end
|