Newer
Older
tconfpy / mktconfpy
  1. #!/bin/sh
  2. # Build a release of tconfpy
  3. # $Id: mktconfpy,v 1.109 2004/04/24 18:57:25 tundra Exp $
  4.  
  5. COLOR=
  6. #COLOR=--color
  7. PROGFILE="tconfpy.py"
  8. SUPPFILES="Makefile tconfpy.3 tconfpy-license.txt test-tc.py test-tc.1 setup.py example.cfg"
  9. DOCFILES="tconfpy.html tconfpy.ps tconfpy.pdf tconfpy.py.ps READ-1ST.txt WHATSNEW.txt tconfpy.txt\
  10. test-tc.html test-tc.ps test-tc.pdf test-tc.py.ps test-tc.txt"
  11.  
  12. # Check Command Line Args
  13.  
  14. DIR="py-tconfpy-"$1
  15.  
  16. if [ $# -ne 1 ]
  17. then
  18. echo "usage: mktconfpy version-number"
  19. exit
  20. fi
  21.  
  22. # Add Release Tag To WHATSNEW
  23.  
  24. co -l WHATSNEW.txt
  25.  
  26. echo "WHATSNEW For 'tconfpy' $1 (`date`)" > wntmp1
  27. echo "----------------------------------------------------------------------" >> wntmp1
  28. echo "" >> wntmp1
  29.  
  30. cat wntmp1 WHATSNEW.txt >wntmp2
  31. mv wntmp2 WHATSNEW.txt
  32. emacs -nw WHATSNEW.txt
  33. ci WHATSNEW.txt
  34. rm wntmp1 wntmp2
  35.  
  36.  
  37.  
  38. # Create Working Directory
  39.  
  40. mkdir $DIR
  41.  
  42. # Extract Files From RCS
  43.  
  44. co -r$1 $PROGFILE
  45. chmod 755 $PROGFILE
  46. co $SUPPFILES
  47. co $DOCFILES
  48.  
  49.  
  50. # Pretty Print The Source Code
  51.  
  52. enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow $COLOR -ptconfpy.py.ps tconfpy.py
  53. enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow $COLOR -ptest-tc.py.ps test-tc.py
  54.  
  55. # Build Documentation
  56.  
  57. rman -fHTML -l tconfpy tconfpy.3 > tconfpy.html
  58. groff -man -Tps tconfpy.3 >tconfpy.ps
  59. gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=tconfpy.pdf tconfpy.ps
  60. groff -man -Tascii tconfpy.3 | col -xb >tconfpy.txt
  61.  
  62. rman -fHTML -l tconfpy test-tc.1 > test-tc.html
  63. groff -man -Tps test-tc.1 >test-tc.ps
  64. gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=test-tc.pdf test-tc.ps
  65. groff -man -Tascii test-tc.1 | col -xb >test-tc.txt
  66.  
  67. chmod 644 $DOCFILES *txt
  68. gzip *.1
  69. gzip *.3
  70.  
  71. # Build And Save The Release
  72.  
  73. mv $PROGFILE $SUPPFILES $DOCFILES $DIR
  74. mv *.gz $DIR
  75. rlog $PROGFILE >$DIR/CHANGELOG.txt
  76. flip -vm $DIR/*txt
  77.  
  78. tar -czvf $DIR.tar.gz $DIR
  79. mv $DIR.tar.gz Releases
  80.  
  81. # Remove Working Directory
  82. rm -rf $DIR
  83.  
  84.