added some debug output to /tmp/log
authorroot@ux6600ws107.fsdportal.local
Sat, 07 Mar 2009 14:20:04 +0100
changeset 2 f2cb4b66de94
parent 1 137256f711af
child 3 ac7735d5fb59
added some debug output to /tmp/log
.hgignore
.hgrc
Makefile
iconv.pl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Sat Mar 07 14:20:04 2009 +0100
@@ -0,0 +1,1 @@
+iconv
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgrc	Sat Mar 07 14:20:04 2009 +0100
@@ -0,0 +1,5 @@
+[extensions]
+hgext.keyword =
+
+[keyword]
+iconv.pl =
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Sat Mar 07 14:20:04 2009 +0100
@@ -0,0 +1,15 @@
+
+user = ssl.sachsengarage.de
+group = $(shell id -gn ${user})
+dir  = ~$(user)/htdocs/tools
+
+.PHONY:	all install clean
+
+all:	iconv
+install:
+	install -m0555 -o ${user} -g ${group} iconv ${dir}/iconv.pl
+
+iconv:	iconv.pl
+	-HGRCPATH=.hgrc hg kwexpand
+	perl -c $<
+	install -m0555 $< $@
--- a/iconv.pl	Sat Mar 07 13:37:26 2009 +0100
+++ b/iconv.pl	Sat Mar 07 14:20:04 2009 +0100
@@ -12,6 +12,8 @@
 $ENV{LANG} = "C";
 delete @ENV{ grep /^LC_/, keys %ENV };
 
+my $VERSION = '$Id$';
+
 my $ME       = basename $0;
 my $CHARSETS = [qw(cp437 cp850 latin1)];
 
@@ -35,7 +37,7 @@
     -encoding => "utf-8",
 );
 my $FOOTER =
-  div({ -align => "right" }, "Scripting &copy; 2008 Heiko Schlittermann");
+  div({ -align => "right" }, "Scripting &copy; 2008 Heiko Schlittermann // $VERSION");
 
 END {
     unlink grep { -M > 1 } glob "/tmp/$ME.*";
@@ -66,11 +68,16 @@
         exit 0;
     };
 
-    print header(
+    $_ = join "",
+    header(
         -type       => "application/octet-stream",
         -attachment => $filename
       ),
       <$fh>;
+    open(X, ">/tmp/log");
+    print X $_;
+    cloes(X);
+    print;
     exit 0;
 
 }
@@ -179,3 +186,5 @@
 }
 
 print header, start_html, h1("Internal Error."), Dump, end_html;
+
+# vim:sts=4 sw=4 aw ai sm: