Newer
Older
twander / mktwander
  1. #!/bin/sh
  2. # Build a release of twander
  3. # $Id: mktwander,v 1.21 2012/06/09 17:33:50 tundra Exp $
  4.  
  5. COLOR=
  6. #COLOR=--color
  7. PROGFILE="twander.py"
  8. SUPPFILES="Makefile twander.1 twander-license.txt .twander"
  9. DOCFILES="twander.html twander.pdf twander.ps twander.py.ps READ-1ST.txt WHATSNEW.txt twander.txt"
  10.  
  11. # Check Command Line Args
  12.  
  13. DIR="twander-"$1
  14.  
  15. if [ $# -ne 1 ]
  16. then
  17. echo "usage: mktwander 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 -ptwander.py.ps twander.py
  35.  
  36. # Build Documentation
  37.  
  38. manserver twander.1 >twander.html
  39. groff -man -Tps twander.1 >twander.ps
  40. gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=twander.pdf twander.ps
  41. groff -man -Tascii twander.1 | col -xb >twander.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 twander.py >$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.