From 88b1d3caaee0fb3a4b7c4b9e48a023e6504fec62 Mon Sep 17 00:00:00 2001 From: graehl Date: Mon, 26 Jul 2010 05:10:44 +0000 Subject: vest git-svn-id: https://ws10smt.googlecode.com/svn/trunk@416 ec762483-ff6d-05da-a07a-a48fb63a330f --- vest/dist-vest.pl | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'vest') diff --git a/vest/dist-vest.pl b/vest/dist-vest.pl index aed74a3f..f537e8b0 100755 --- a/vest/dist-vest.pl +++ b/vest/dist-vest.pl @@ -58,7 +58,7 @@ my $oracleb=20; my $dirargs=''; my $density_prune; my $usefork; - +my $cpbin=1; # Process command-line options Getopt::Long::Configure("no_auto_abbrev"); if (GetOptions( @@ -165,6 +165,18 @@ my $user = $ENV{"USER"}; -e $iniFile || die "Error: could not open $iniFile for reading\n"; open(INI, $iniFile); +#pass bindir, refs to vars holding bin +sub modbin { + local $_; + my $bindir=shift; + `mkdir -p $bindir`; + for (@_) { + my $src=$$_; + $$_="$bindir/".`basename $src`; + `cp $src $$_`; + die ""cp $src $$_" failed: $!" unless $? == 0; + } +} sub dirsize { opendir ISEMPTY,$_[0]; return scalar(readdir(ISEMPTY))-1; @@ -178,6 +190,7 @@ if ($dryrun){ } else { -e $dir || mkdir $dir; mkdir "$dir/hgs"; + modbin($bindir,\$cdec,\$SCORER,\$MAPINPUT,\$MAPPER,\$REDUCER,\$parallelize) if $cpbin; mkdir "$dir/scripts"; my $cmdfile="$dir/rerun-vest.sh"; open CMD,'>',$cmdfile; -- cgit v1.2.3