summaryrefslogtreecommitdiff
path: root/what-to-build.pl
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2015-07-13 19:05:38 +0200
committerJoachim Breitner <mail@joachim-breitner.de>2015-07-13 19:05:38 +0200
commitbecb5a23607e5a3396b548a1eb9f616452a1cb93 (patch)
tree5a534e7ba552941855feb622261e2a9ffd9c621d /what-to-build.pl
parent88d511fadb2a995bff2d3f82c0114f1c562c716a (diff)
downloadDHG_packages-becb5a23607e5a3396b548a1eb9f616452a1cb93.tar.gz
New script: what-to-build.pl
This shows a few untagged repositories...
Diffstat (limited to 'what-to-build.pl')
-rwxr-xr-xwhat-to-build.pl37
1 files changed, 37 insertions, 0 deletions
diff --git a/what-to-build.pl b/what-to-build.pl
new file mode 100755
index 000000000..4c63cbaaa
--- /dev/null
+++ b/what-to-build.pl
@@ -0,0 +1,37 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+my @dirs = @ARGV;
+
+unless (@dirs) {
+ @dirs = glob 'p/*/';
+}
+
+my @to_build;
+
+my %tags;
+open TAGS, '-|', 'git tag -l' or die @!;
+while (<TAGS>) { chomp; $tags{$_}++ };
+close TAGS or die @!;
+
+for my $dir (@dirs) {
+ my $changelog = "$dir/debian/changelog";
+ next unless -r $changelog;
+ open CHANGELOG, '<', $changelog or die @!;
+ my $firstline = <CHANGELOG>;
+ if ($firstline =~ m/([\w-]+) \(([\w:~.+-]+)\) (\w+);/) {
+ my ($source, $version, $suite) = ($1, $2, $3);
+ my $tag = sprintf "%s_v%s", $source, $version;
+ next if ($suite eq "UNRELEASED");
+ next if ($tags{$tag});
+ printf "%s\n", $dir;
+ } else {
+ printf STDERR "Cannot parse %s:\n%s", $changelog, $firstline;
+ next
+ }
+}
+
+
+