X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=lib%2Fredact%2Fapp.rb;h=2cc9dd7cf74b7022948a0d207380bb08127c32ab;hb=32110b209dd3a39fc9e36b83ba830a9172ad6c15;hp=7c5f39ee69334d8c2533712c142c95e7e32f1353;hpb=2b2cd361e8f12e21896cd041f9159743d3c27110;p=redact.git diff --git a/lib/redact/app.rb b/lib/redact/app.rb index 7c5f39e..2cc9dd7 100644 --- a/lib/redact/app.rb +++ b/lib/redact/app.rb @@ -1,5 +1,5 @@ #-- -# $Id: app.rb 3 2005-03-26 19:21:15Z tilman $ +# $Id: app.rb 40 2005-05-25 20:19:45Z tilman $ # # Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de) # @@ -66,15 +66,20 @@ module Redact amx = compile_embryo - Eet::File.open(@options.output, "w") do |ef| - dump_amx(amx, ef) - - dump_header(ef) - dump_collections(ef) - dump_fonts(ef) - dump_images(ef) - dump_source(ef) - dump_fontmap(ef) + begin + Eet::File.open(@options.output, "w") do |ef| + dump_amx(amx, ef) + + dump_header(ef) + dump_collections(ef) + dump_fonts(ef) + dump_images(ef) + dump_source(ef) + dump_fontmap(ef) + end + rescue Exception + File.rm_f(@options.output) + raise end end @@ -110,11 +115,7 @@ module Redact end o.on_tail("--version", "Show version") do - puts <