[Pkg-gnupg-commit] r168 - /updchk.pl

dleidert-guest at users.alioth.debian.org dleidert-guest at users.alioth.debian.org
Sun Dec 6 16:10:42 UTC 2009


Author: dleidert-guest
Date: Sun Dec  6 16:10:30 2009
New Revision: 168

URL: http://svn.debian.org/wsvn/pkg-gnupg/?sc=1&rev=168
Log:
Add a small script to check for new upstream releases.


Added:
    updchk.pl   (with props)

Added: updchk.pl
URL: http://svn.debian.org/wsvn/pkg-gnupg/updchk.pl?rev=168&op=file
==============================================================================
--- updchk.pl (added)
+++ updchk.pl Sun Dec  6 16:10:30 2009
@@ -1,0 +1,47 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+my $svncat = "/usr/bin/svnlook cat /svn/pkg-gnupg";
+my $send = 0;
+my $infomail;
+
+open (TREE, "/usr/bin/svnlook tree -N /svn/pkg-gnupg |");
+my @array = map { $_ =~ /^ ([[:graph:]]+)\/$/m ; }(grep { $_ =~ m/^ ([[:graph:]]+)\/$/m ; } <TREE>);
+close (TREE);
+
+if (! @array) { exit(0); }
+
+$infomail  = "Report for packages of Debian GnuPG-Maintainers\n";
+$infomail .= "***********************************************\n\n";
+
+foreach (@array) {
+	my $watchpath  = "$_" . "/" . "trunk" . "/" . "debian/watch";
+	my $changepath = "$_" . "/" . "trunk" . "/" . "debian/changelog";
+	my $changefile = `$svncat $changepath | /usr/bin/dpkg-parsechangelog -l-`;
+	my ($package, $version) = ($changefile =~ /^Source: (.*?)$/m, $changefile =~ /^Version: ([^-]+)-.*$/m);
+
+	if ( ! system("$svncat $watchpath >> /dev/null 2>&1") ) {
+		my $watchfile = `$svncat $watchpath`;
+		open (USCAN, "$svncat $watchpath | /usr/bin/uscan --no-download --watchfile -" .
+		             " --package $package --upstream-version $version 2>&1 |");
+		my @tmp = <USCAN>;
+		if (@tmp) {
+			$infomail .= "@tmp\n";
+			$send = 1;
+		}
+		close (USCAN);
+	}
+}
+
+$infomail .= "\n\n";
+
+if ($send != 0) {
+	open (INFOMAIL, "| /usr/bin/mail -s 'Package information for the pkg-gnupg project'" .
+	                " 'Debian GnuPG-Maintainers <pkg-gnupg-maint\@lists.alioth.debian.org>'");
+	print INFOMAIL $infomail;
+	close (INFOMAIL);
+}
+
+exit(0);

Propchange: updchk.pl
------------------------------------------------------------------------------
    svn:executable = 




More information about the Pkg-gnupg-commit mailing list