summaryrefslogtreecommitdiffstats
path: root/gitmirror/robotfmt.pl
diff options
context:
space:
mode:
Diffstat (limited to 'gitmirror/robotfmt.pl')
-rwxr-xr-xgitmirror/robotfmt.pl27
1 files changed, 27 insertions, 0 deletions
diff --git a/gitmirror/robotfmt.pl b/gitmirror/robotfmt.pl
new file mode 100755
index 0000000..0eeefed
--- /dev/null
+++ b/gitmirror/robotfmt.pl
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+($mailto) = @ARGV;
+
+$hdr = 1;
+while (defined($line = <STDIN>)) {
+ chomp $line;
+ if ($hdr) {
+ next if ($line =~ /^From /); # Skip line
+ if ($line =~ /^Date:/) {
+ $date = $line;
+ next;
+ }
+ if ($line eq '') {
+ $hdr = 0;
+ print "To: $mailto\n";
+ print "X-Mailer: NASM-git-log-daemon\n";
+ print "\n";
+ print $date, "\n";
+ print "\n";
+ next;
+ }
+ }
+ print $line, "\n";
+}
+
+exit 0;