B
Brian Schröder
Hello rubyists,
I released a new cleaned up version of the gdiff / gpatch library and
programs. Now available as a gem and in setup.rb format.
Find it at
http://ruby.brian-schroeder.de/gdiff/
Installation:
wget http://ruby.brian-schroeder.de/gdiff/releases/gdiff-0.0.1.tar.bz2
tar -xvvjf gdiff-0.0.1.tar.bz2
cd gdiff-0.0.1
ruby setup.rb
Usage:
gdiff file_a file_b > patch
gpatch file_a patch > file_b_from_patch
or as a library:
require 'gdiff'
File.open("patch", "wb") do | patch |
patch << Diff::GDiff.diff(File.read("file_a"), File.read("file_b")).pac=
k
end
File.open("file_b_from_patch", "wb") do | file_b_2 |
file_b_2 <<
Diff::GDiff.unpack(File.read("patch")).apply_to(File.read("file_a"))
end
regard,
Brian
I released a new cleaned up version of the gdiff / gpatch library and
programs. Now available as a gem and in setup.rb format.
Find it at
http://ruby.brian-schroeder.de/gdiff/
Installation:
wget http://ruby.brian-schroeder.de/gdiff/releases/gdiff-0.0.1.tar.bz2
tar -xvvjf gdiff-0.0.1.tar.bz2
cd gdiff-0.0.1
ruby setup.rb
Usage:
gdiff file_a file_b > patch
gpatch file_a patch > file_b_from_patch
or as a library:
require 'gdiff'
File.open("patch", "wb") do | patch |
patch << Diff::GDiff.diff(File.read("file_a"), File.read("file_b")).pac=
k
end
File.open("file_b_from_patch", "wb") do | file_b_2 |
file_b_2 <<
Diff::GDiff.unpack(File.read("patch")).apply_to(File.read("file_a"))
end
regard,
Brian