getconf.red 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. % getconf.red
  2. % Hearn keeps his master configuration data (at least in a pre-release
  3. % version of 3.7) in two DOS batch files. This script extracts the
  4. % information and puts it here where I want it!
  5. % To run this script you need a working REDUCE. If you were having to
  6. % build for the VERY first time and did not have an existing config.lsp
  7. % file you would need to transcribe the information from the batch files
  8. % mentioned here by hand. But once you have a REDUCE built you can select
  9. % the reduce build directory as current and go
  10. % r37 ../util/getconf.red
  11. % to refresh ../util/config.lsp from that top-level data.
  12. symbolic;
  13. a := open("../../../upackage.bat", 'input);
  14. p1 := nil;
  15. while atom p1 and p1 neq !$eof!$ do <<
  16. a := rds a; p1 := read(); a := rds a >>;
  17. p2 := w := nil;
  18. while w neq !$eof!$ do <<
  19. w := nil;
  20. while atom w and w neq !$eof!$ do <<
  21. a := rds a; w := read(); a := rds a >>;
  22. if not atom w then p2 := append(p2, w) >>;
  23. close a;
  24. a := open("../../../xpackage.bat", 'input);
  25. p3 := w := nil;
  26. while w neq !$eof!$ do <<
  27. w := nil;
  28. while atom w and w neq !$eof!$ do <<
  29. a := rds a; w := read(); a := rds a >>;
  30. if not atom w then p3 := append(p3, w) >>;
  31. close a;
  32. a := open("../util/config.lsp", 'output);
  33. << a := wrs a; linelength 72;
  34. print p1; terpri();
  35. print p2; terpri();
  36. print p3; terpri();
  37. close wrs a >>;
  38. end;
  39.