Source code of Windows XP (NT5)
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.

40 lines
987 B

  1. $NtTree = $ENV{ "_NTPostBld" };
  2. # quick parse the command line
  3. undef( $AppendMode );
  4. foreach $Argument ( @ARGV ) {
  5. if ( $Argument =~ /[\/\-]a/i ) {
  6. $AppendMode = ">";
  7. } else {
  8. print( "Unrecognized option '$Argument', exiting.\n" );
  9. exit( 1 );
  10. }
  11. }
  12. $InputFile = "$NtTree\\build_logs\\bindiff1.txt";
  13. $OutputFile = "$NtTree\\build_logs\\bindiff.txt";
  14. unless ( open( INFILE, $InputFile ) ) {
  15. print( "Failed to open '$InputFile' for reading, exiting.\n" );
  16. exit( 1 );
  17. }
  18. @InfileLines = <INFILE>;
  19. close( INFILE );
  20. print( "DEBUG: $AppendMode>$OutputFile\n" );
  21. unless ( open( OUTFILE, "$AppendMode>$OutputFile" ) ) {
  22. print( "Failed to open '$OutputFile' for writing, exiting.\n" );
  23. exit( 1 );
  24. }
  25. # now parse out the interesting lines
  26. foreach $Line ( @InfileLines ) {
  27. chomp( $Line );
  28. if ( $Line =~ /\-\- / ) { next; }
  29. ( $Junk, $Junk, $FileName, $Junk ) = split( /\s+/, $Line );
  30. print( OUTFILE "$FileName\n" );
  31. }
  32. close( OUTFILE );
  33. exit( 0 );