Skip to content
Browse files

Initial revision

  • Loading branch information...
1 parent 29adada commit 09597a18d19cd8984c9c12c194258127bda36c6a andrew committed with Mar 24, 2005
Showing with 31 additions and 0 deletions.
  1. +31 −0 NewTorrents.pl
View
31 NewTorrents.pl
@@ -0,0 +1,31 @@
+#!/usr/bin/perl -T
+#$Id$
+use strict;
+use warnings;
+use diagnostics;
+
+use lib 'lib';
+use OpenBSDTorrents;
+
+%ENV = ();
+
+use YAML;
+
+my $last_dir = '';
+while (<>) {
+ chomp;
+ if (my ($year, $mon, $mday, $time, $pid, $oper, $file, $size) =
+ m#^(\d{4})/(\d{2})/(\d{2}) (\d{2}:\d{2}:\d{2}) \[(\d+)\] (\S+) (.+) (\d+)$# ) {
+ #print "($year, $mon, $mday, $time, $pid, $oper, $file, $size)\n";
+ my ($dir, $file) = $file =~ m#^(.*)/([^/]+)#;
+ #print "$dir - $file\n";
+ if ($last_dir && $last_dir ne $dir) {
+ # This actually needs to be a sub that forks off
+ # the generation of this, and the running of the update script.
+ print "MakeTorrent.pl $BaseName/$dir\n";
+ }
+ $last_dir = $dir;
+ } else {
+ #print $_;
+ }
+}

0 comments on commit 09597a1

Please sign in to comment.
Something went wrong with that request. Please try again.