summaryrefslogtreecommitdiff
path: root/export-all.pl
blob: 48670b5b7ead51ab687b598c619983fc2b2d5ed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/perl

use strict;

sub process($){
  my ($dir) = @_;
  my @exp = split(":", $dir);
  my $name = $exp[4];
  my $ep;
  my $path = "results/" . $dir . "/";
  my $chex = $path . "checkpoints/";
  return 0 unless -e $chex;
  my $sampz = $path . "samples/";
  return 0 unless -e $sampz;

  print $name . "\n";
  system('/bin/bash', 'mix.sh', $path, $name);
}

opendir RESULTS, ("results/") or die $!;
# my @results = sort {(stat $a)[9] <=> (stat $b)[9]} readdir(RESULTS);
my @results = sort {$a cmp $b} readdir(RESULTS);
closedir RESULTS;

for my $result (@results) {
  next if $result !~ /exp:/;
  process($result);
}