home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / wp_dtp / ghostscr.lha / gs252 / gsconfig.ami < prev    next >
Text File  |  1993-01-21  |  924b  |  45 lines

  1. #!/bin/sh
  2. if test "$1" = "+" 
  3. then
  4.     shift
  5. else
  6.     rm -f _temp_.dob _temp_.dop _temp_.dlb _temp_.d
  7.     touch _temp_.dob _temp_.dop _temp_.dlb _temp_.d
  8.     rm -f _temp_.dh
  9.     echo '/* This file was automatically generated by Ghostscript (gsconfig). */' > _temp_.dh
  10.     echo '/* See gconfig.c for documentation. */' >>_temp_.dh
  11. fi
  12. rm -f _temp_.c
  13. cat <<EOF >_temp_.c
  14. /bin/sh < _temp_.d
  15. rm -f obj.tr gconfig.h lib.tr
  16.  
  17. #sort <_temp_.dob | uniq >obj.tr
  18. #     AmigaDOS sort
  19. sort from _temp_.dob to _temp_.dob.sorted 
  20. uniq < _temp_.dob.sorted >obj.tr
  21. rm -f _temp_.dob.sorted
  22.  
  23. #sort <_temp_.dop | uniq >>_temp_.dh
  24. #     AmigaDOS sort
  25. sort from _temp_.dop to _temp_.dop.sorted
  26. uniq <_temp_.dop.sorted >>_temp_.dh
  27. rm -f _temp_.dop.sorted
  28.  
  29. mv _temp_.dh gconfig.h
  30. mv _temp_.dlb lib.tr
  31. rm -f _temp_.d*
  32. EOF
  33. for dev in $*
  34. do
  35.     if test "${dev}" = "+" 
  36.     then
  37.         rm -f _temp_.c
  38.         touch _temp_.c
  39.     else
  40.         cat ${dev} >>_temp_.d
  41.     fi
  42. done
  43. /bin/sh < _temp_.c
  44. rm _temp_.c
  45.