From 88e9264dd25dceb98cfc2cb347eaba1ad0b3d664 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 7 Jun 2012 17:14:31 +0000 Subject: [PATCH] automatically make output directory is using minimal script --- fips/fipsalgtest.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fips/fipsalgtest.pl b/fips/fipsalgtest.pl index d95a8c324c..2e31335ae9 100644 --- a/fips/fipsalgtest.pl +++ b/fips/fipsalgtest.pl @@ -1021,6 +1021,10 @@ END $out =~ s|/req/(\S+)\.req|/$rspdir/$1.rsp|; my $outdir = $out; $outdir =~ s|/[^/]*$||; + if ( !-d $outdir && ($outfile eq "" || $minimal_script)) { + print STDERR "DEBUG: Creating directory $outdir\n" if $debug; + mkdir($outdir) || die "Can't create directory $outdir"; + } if ($outfile ne "") { if ($win32) { $outdir =~ tr|/|\\|; @@ -1043,9 +1047,6 @@ END } $lastdir = $outdir; } - } elsif ( !-d $outdir ) { - print STDERR "DEBUG: Creating directory $outdir\n" if $debug; - mkdir($outdir) || die "Can't create directory $outdir"; } } my $cmd = "$tcmd \"$sfprefix$req\" \"$sfprefix$out\""; -- 2.25.1