From 756e4d11226dfd59a3da49e571f605d29e715170 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 19 Apr 2018 16:52:21 +0200 Subject: wav export scripts --- export-all.pl | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 export-all.pl (limited to 'export-all.pl') diff --git a/export-all.pl b/export-all.pl new file mode 100644 index 0000000..48670b5 --- /dev/null +++ b/export-all.pl @@ -0,0 +1,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); +} -- cgit v1.2.3-70-g09d2