mirror of the now-defunct rocklinux.org
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.

35 lines
506 B

  1. #!/usr/bin/gawk -f
  2. BEGIN {
  3. speedargidx=0;
  4. sizeargidx=0;
  5. isholy=0;
  6. }
  7. ARGIND == 1 {
  8. holylist[$4] = 1;
  9. }
  10. ARGIND == 2 {
  11. if ( gsub("^-SPEED", "") == 1 )
  12. speedarg[speedargidx++] = $0;
  13. else
  14. if ( gsub("^-SIZE", "") == 1 )
  15. sizearg[sizeargidx++] = $0;
  16. else {
  17. speedarg[speedargidx++] = $0;
  18. sizearg[sizeargidx++] = $0;
  19. }
  20. if ( holylist[$0] == 1 )
  21. isholy=1;
  22. }
  23. END {
  24. if ( isholy )
  25. for (i=0; i<speedargidx; i++)
  26. print speedarg[i];
  27. else
  28. for (i=0; i<sizeargidx; i++)
  29. print sizearg[i];
  30. }