Newer
Older
nohtml / mknohtml
  1. #!/bin/sh
  2. # Build a release of nohtml
  3. # $Id: mknohtml,v 1.2 2012/06/09 17:38:32 tundra Exp $
  4.  
  5. COLOR=
  6. #COLOR=--color
  7. PROGFILE="nohtml.py"
  8. SUPPFILES="Makefile nohtml.1 nohtml-license.txt"
  9. DOCFILES="nohtml.html nohtml.ps nohtml.pdf nohtml.py.ps READ-1ST.txt WHATSNEW.txt nohtml.txt"
  10.  
  11. # Check Command Line Args
  12.  
  13. DIR="nohtml-"$1
  14.  
  15. if [ $# -ne 1 ]
  16. then
  17. echo "usage: mknohtml version-number"
  18. exit
  19. fi
  20.  
  21. # Create Working Directory
  22.  
  23. mkdir $DIR
  24.  
  25. # Extract Files From RCS
  26.  
  27. co -r$1 $PROGFILE
  28. chmod 755 $PROGFILE
  29. co $SUPPFILES
  30. co $DOCFILES
  31.  
  32. # Pretty Print The Source Code
  33.  
  34. enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow $COLOR -pnohtml.py.ps nohtml.py
  35.  
  36. # Build Documentation
  37.  
  38. rman -fHTML -l nohtml nohtml.1 > nohtml.html
  39. groff -man -Tps nohtml.1 >nohtml.ps
  40. gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=nohtml.pdf nohtml.ps
  41. groff -man -Tascii nohtml.1 | col -xb >nohtml.txt
  42. chmod 644 $DOCFILES *txt
  43. gzip *.1
  44.  
  45. # Build And Save The Release
  46.  
  47. mv $PROGFILE $SUPPFILES $DOCFILES $DIR
  48. mv *.gz $DIR
  49. cvs log $PROGFILE >$DIR/CHANGELOG.txt
  50. flip -vm $DIR/*txt
  51. tar -czvf $DIR.tar.gz $DIR
  52. mv $DIR.tar.gz Releases
  53.  
  54. # Remove Working Directory
  55. rm -rf $DIR
  56.  
  57.