chiark / gitweb /
WIP Much rework for new upload arrangements and new name
[ypp-sc-tools.main.git] / yarrg / update-master-info
diff --git a/yarrg/update-master-info b/yarrg/update-master-info
new file mode 100755 (executable)
index 0000000..a52b212
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/perl -w
+
+use strict (qw(vars));
+
+use DBI;
+
+use Commods;
+
+@ARGV==1 or die;
+my ($rsyncdir) = @ARGV;
+
+parse_info_serverside();
+
+foreach my $oceanname (sort keys %oceans) {
+    print STDERR "updating ocean $oceanname...\n";
+    system('./db-idempotent-populate',$oceanname); die $? if $?;
+}
+
+print STDERR "installing new master-info...\n";
+my $df= "$rsyncdir/master-info.txt";
+system('cp','--','master-info.txt',"$df.tmp"); die $? if $?;
+system('mv','--',"$df.tmp",$df); die $? if $?