specifically close the output stream or else the content is garbled
authorgc <gc>
Sat, 5 Mar 2005 14:34:34 +0000 (14:34 +0000)
committergc <gc>
Sat, 5 Mar 2005 14:34:34 +0000 (14:34 +0000)
booh

diff --git a/booh b/booh
index f5ba7962a06fe1fa93d4b3781d5b41f22791d5cc..868937d7cf674a9306651868b160af7bd5cf4770 100755 (executable)
--- a/booh
+++ b/booh
@@ -55,6 +55,8 @@ end
 def msg(verbose_level, msg)
     if verbose_level <= $verbose_level
         if verbose_level == 0
+            warn "***ERROR***: #{msg}"
+        elsif verbose_level == 1
             warn "Warning: #{msg}"
         else
             puts msg
@@ -207,8 +209,10 @@ def walk_source_dir
             i.sub!(/~~images~~/, images4js)
             i.sub!(/~~title~~/, File.basename(dir))
         end
-            
-        File.open("#{dest_dir}/index.html", "w").write(html)
+
+        ios = File.open("#{dest_dir}/index.html", "w")
+        ios.write(html)
+        ios.close
     }
 end