diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-06-26 14:47:46 +0200 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-06-26 14:47:46 +0200 |
commit | 55cafb1189cac406aa0e5c4fc7d8fd57da69c9a4 (patch) | |
tree | ad24c01bcda6f835432cd08798dbb52e24c71961 /minrisk/minrisk_generate_input.pl | |
parent | ea2c5fb04f69844fe81101283deaaf69a63ce865 (diff) | |
parent | 9c1dd817177331baeea66441861682fa29cf0262 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'minrisk/minrisk_generate_input.pl')
-rwxr-xr-x | minrisk/minrisk_generate_input.pl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/minrisk/minrisk_generate_input.pl b/minrisk/minrisk_generate_input.pl new file mode 100755 index 00000000..b30fc4fd --- /dev/null +++ b/minrisk/minrisk_generate_input.pl @@ -0,0 +1,18 @@ +#!/usr/bin/perl -w +use strict; + +die "Usage: $0 HG_DIR\n" unless scalar @ARGV == 1; +my $d = shift @ARGV; +die "Can't find directory $d" unless -d $d; + +opendir(DIR, $d) or die "Can't read $d: $!"; +my @hgs = grep { /\.gz$/ } readdir(DIR); +closedir DIR; + +for my $hg (@hgs) { + my $file = $hg; + my $id = $hg; + $id =~ s/(\.json)?\.gz//; + print "$d/$file $id\n"; +} + |