From 719b607539a9f76e1968314c11db06e85f459338 Mon Sep 17 00:00:00 2001 From: graehl Date: Wed, 30 Jun 2010 17:23:33 +0000 Subject: par: check -e dir created git-svn-id: https://ws10smt.googlecode.com/svn/trunk@79 ec762483-ff6d-05da-a07a-a48fb63a330f --- vest/parallelize.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vest') diff --git a/vest/parallelize.pl b/vest/parallelize.pl index 9ac0f30d..0b7ffaa2 100755 --- a/vest/parallelize.pl +++ b/vest/parallelize.pl @@ -93,7 +93,7 @@ sub extend_path($$;$$) { } else { $dir=prefix_dirname($base); } - system("mkdir -p '$dir'") if $mkdir; + system("/bin/mkdir","-p",$dir) if $mkdir; } return $base.$ext; } @@ -246,8 +246,9 @@ sub numof_live_jobs { return ($#livejobs + 1); } my (@errors,@outs,@cmds); -my $scriptfile=extend_path("$errordir","$executable.sh",1,1); if ($errordir) { + my $scriptfile=extend_path("$errordir","$executable.sh",1,1); + -d $errordir || die "should have created -e dir $errordir"; open SF,">",$scriptfile || die; print SF "$cdcmd$cmd\n"; close SF; -- cgit v1.2.3