Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.7 KiB

  1. sub joe_comp {
  2. ### Where to send the uncompressed file.
  3. $dest = "\\\\ntburnlab2";
  4. #$dest = "d:";
  5. system "title [JOECOMP]";
  6. ### Strip any unnecessary characters from the build number.
  7. $loc = "L" if $build =~ /.*(L).*/i;
  8. $build =~ s/^(\d{4})\S*(L?)\S*/$1$2/i;
  9. #$build = "$build$loc";
  10. ### Clean out old builds
  11. opendir JOEDIR, "$dest\\joehol\\compare\\$lang" or print "Could not open $dest\\joehol\\compare\\$lang: $!\n";
  12. @joefiles = grep !/^\.\.?$/, readdir JOEDIR;
  13. close JOEDIR;
  14. foreach $joedir ( @joefiles ) {
  15. if ( -d "$dest\\joehol\\compare\\$lang\\$joedir" ) {
  16. if ( $lang =~ /USA/i ) {
  17. execute "start /min cmd /c \"title [JOECOMP] Removing $dest\\joehol\\compare\\$lang\\$joedir && rd /s /q $dest\\joehol\\compare\\$lang\\$joedir\n" if -M "$dest\\joehol\\compare\\$lang\\$joedir\"" > 2;
  18. } else {
  19. execute "start /min cmd /c \"title [JOECOMP] Removing $dest\\joehol\\compare\\$lang\\$joedir && rd /s /q $dest\\joehol\\compare\\$lang\\$joedir\n" if -M "$dest\\joehol\\compare\\$lang\\$joedir\"" > 7;
  20. }
  21. }
  22. }
  23. ### Where did we copy this build to?
  24. if ( !$drive ) {
  25. if ( $loc ) {
  26. $drive = "D:"
  27. } else {
  28. ( $daily, $drive ) = bs_drive( $build );
  29. }
  30. }
  31. foreach $product ( @products ) {
  32. $prod = "$prod $product";
  33. foreach $platform ( 'x86' ) {
  34. if ( $platform =~ /x86/i ) { $platdir = "i386"; }
  35. else { $platdir = $platform; }
  36. print "Expanding $build $drive\\$lang\\$proddir{$product}\\$platform to $dest\\joehol\\compare\\$lang\\$build\\$platform\\$proddir{$product}. Do not close this window.";
  37. system "TITLE [JEOCOMP] Expanding $build $drive\\$lang\\$proddir{$product}\\$platform to $dest\\joehol\\compare\\$lang\\$build\\$platform\\$proddir{$product}. Do not close this window.";
  38. foreach $make_dir ( "$dest\\joehol\\logs",
  39. "$dest\\joehol\\compare",
  40. "$dest\\joehol\\compare\\$lang",
  41. "$dest\\joehol\\compare\\$lang\\$build",
  42. "$dest\\joehol\\compare\\$lang\\$build\\$platform",
  43. "$dest\\joehol\\compare\\$lang\\$build\\$platform\\$proddir{$product}"
  44. ) {
  45. execute "md $make_dir\n" unless -e $make_dir;
  46. }
  47. execute "
  48. copy /y $drive\\$lang\\$proddir{$product}\\$platform\\$platdir\\driver.cab $dest\\joehol\\compare\\$lang\\$build\\$platform\\$proddir{$product}
  49. expand -r $drive\\$lang\\$proddir{$product}\\$platform\\$platdir\\*.* $dest\\joehol\\compare\\$lang\\$build\\$platform\\$proddir{$product}
  50. if exist $drive\\$lang\\$proddir{$product}\\$platform\\$platdir\\lang\\*.* expand -r $drive\\$lang\\$proddir{$product}\\$platform\\$platdir\\lang\\*.* $dest\\joehol\\compare\\$lang\\$build\\$platform\\$proddir{$product}
  51. ";
  52. foreach $lplang ( 'ara', 'chs', 'cht', 'heb', 'ind', 'jpn', 'kor', 'tha' ) {
  53. execute "expand -r $drive\\$lang\\$proddir{$product}\\$platform\\$platdir\\lang\\$lplang\\*.* $dest\\joehol\\compare\\$lang\\$build\\$platform\\$proddir{$product}\n";
  54. }
  55. }
  56. sendudp( "KEEBLER", "Finished uncompressing $build $lang $product CD tree(s) to $dest\\joehol\\compare\\$lang\\$build" );
  57. }
  58. # sendudp( "KEEBLER", "Finished uncompressing $build $lang [$products ] CD tree(s) to $dest\\joehol\\compare\\$lang\\$build" );
  59. exit;
  60. }
  61. return 1;