build_package.pl
changeset 70 450398a72180
parent 69 82b5ad2f2024
child 71 f7ba24a607f8
equal deleted inserted replaced
69:82b5ad2f2024 70:450398a72180
    97 #}
    97 #}
    98 
    98 
    99 my $sWORKING_DRIVE = find_working_drive();
    99 my $sWORKING_DRIVE = find_working_drive();
   100 print "Will use drive $sWORKING_DRIVE as working drive for this build\n";
   100 print "Will use drive $sWORKING_DRIVE as working drive for this build\n";
   101 
   101 
       
   102 # check that $sLETTERS_FILE exists, otherwise create it
       
   103 if (!-f "$sWORKING_DRIVE\\$sLETTERS_FILE")
       
   104 {
       
   105 	open FILE, ">$sWORKING_DRIVE\\$sLETTERS_FILE";
       
   106 	print FILE "\n";
       
   107 	close FILE;
       
   108 }
       
   109 
   102 if ($bHudson)
   110 if ($bHudson)
   103 {
   111 {
   104 	my $nProcessors = $ENV{'NUMBER_OF_PROCESSORS'};
   112 	my $nProcessors = $ENV{'NUMBER_OF_PROCESSORS'};
   105 	my $diroutput = `dir /-C $sWORKING_DRIVE`;
   113 	my $diroutput = `dir /-C $sWORKING_DRIVE`;
   106 	my $nBytesFree = 0;
   114 	my $nBytesFree = 0;
   211 	}
   219 	}
   212 	$nUnformattedNumber = get_job_number($sJobNumberKey);
   220 	$nUnformattedNumber = get_job_number($sJobNumberKey);
   213 }
   221 }
   214 my $nJobNumber = sprintf("%.3d", $nUnformattedNumber);
   222 my $nJobNumber = sprintf("%.3d", $nUnformattedNumber);
   215 print "For build key $sJobNumberKey got assigned number \"$nJobNumber\"\n";
   223 print "For build key $sJobNumberKey got assigned number \"$nJobNumber\"\n";
   216 
       
   217 # check that $sLETTERS_FILE exists, otherwise create it
       
   218 if (!-f "$sWORKING_DRIVE\\$sLETTERS_FILE")
       
   219 {
       
   220 	open FILE, ">$sWORKING_DRIVE\\$sLETTERS_FILE";
       
   221 	print FILE "\n";
       
   222 	close FILE;
       
   223 }
       
   224 
   224 
   225 # acquire drive letter
   225 # acquire drive letter
   226 my $sDriveLetter = acquire_drive_letter();
   226 my $sDriveLetter = acquire_drive_letter();
   227 die "Could not acquire drive letter" if (!$sDriveLetter);
   227 die "Could not acquire drive letter" if (!$sDriveLetter);
   228 print "acquired drive letter: $sDriveLetter\n";
   228 print "acquired drive letter: $sDriveLetter\n";