summaryrefslogtreecommitdiffstats
path: root/tools/addchangelog.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/addchangelog.pl')
-rwxr-xr-xtools/addchangelog.pl21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/addchangelog.pl b/tools/addchangelog.pl
new file mode 100755
index 000000000..eff3e76ea
--- /dev/null
+++ b/tools/addchangelog.pl
@@ -0,0 +1,21 @@
+#!/usr/bin/perl
+
+@ARGV == 2 or die "usage $0: <dir> <cvslog2changelog script>\n";
+
+($dir, $script) = @ARGV;
+
+chomp(my $cwd = `pwd`);
+$script = "$cwd/$script" if $script !~ m|^/|;
+
+chdir $dir;
+$date = (split('/', `grep ChangeLog CVS/Entries`))[3];
+
+@changelog = `cvs log -d ">$date" | $script`;
+@before = `cat ChangeLog`;
+
+print foreach @changelog;
+
+open F, ">ChangeLog";
+print F foreach @changelog, @before;
+
+system(q(cvs commit -m "New snapshot uploaded" ChangeLog));