chckallp.pl 921 B

12345678910111213141516171819202122232425262728293031323334353637
  1. $bool = 0;
  2. $MACHINE = $ENV{'MACHINE'};
  3. $package = $ARGV[0];
  4. $reduce = $ENV{'reduce'};
  5. open(FLO,">>$reduce/log/checkall.log");
  6. print FLO "\nChecking $package ...\n\n";
  7. open(FL,"$reduce/package.red") || die "$reduce/package.red not there";
  8. while ($x=<FL>) {
  9. if ($x =~ /folder/) {
  10. @y = split(/,'/,substr($x,5,-3));
  11. if ($y[0] eq $package) {
  12. if ($MACHINE eq win32) {
  13. print FLO
  14. `$dif $reduce\\log\\$package.rlg $reduce\\packages\\$y[2]\\$package.rlg`;}
  15. else {
  16. print FLO `diff $reduce/log/$package.rlg $reduce/packages/$y[2]/$package.rlg`;}
  17. $bool = 1; last;}}}
  18. if ($bool == 0) {
  19. if ($MACHINE eq win32) {
  20. print FLO
  21. `$dif $reduce\\log\\$package.rlg $reduce\\packages\\$package\\$package.rlg`;}
  22. else {
  23. print FLO `diff $reduce/log/$package.rlg $reduce/packages/$package/$package.rlg`;}
  24. }
  25. close FLO;
  26. exit(0);