automatically make output directory is using minimal script
authorDr. Stephen Henson <steve@openssl.org>
Thu, 7 Jun 2012 17:14:31 +0000 (17:14 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 7 Jun 2012 17:14:31 +0000 (17:14 +0000)
fips/fipsalgtest.pl

index d95a8c324cc7878b2bfe4ec2ce3c1c23d3110c8b..2e31335ae98bd4ca215f4f695d75a4606ee09c04 100644 (file)
@@ -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\"";