Newer
Older
tconfpy / mktconfpy
  1. #!/bin/sh
  2. # Build a release of tconfpy
  3. # $Id: mktconfpy,v 1.108 2004/04/22 22:20: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. echo "DON'T FORGET TO UPDATE WHATSNEW!!!!!!!"
  25. read X
  26.  
  27. co -l WHATSNEW.txt
  28.  
  29. echo "WHATSNEW For 'tconfpy' $1 (`date`)" > wntmp1
  30. echo "----------------------------------------------------------------------" >> wntmp1
  31. echo "" >> wntmp1
  32.  
  33. cat wntmp1 WHATSNEW.txt >wntmp2
  34. mv wntmp2 WHATSNEW.txt
  35. ci WHATSNEW.txt <wntmp1
  36. rm wntmp1 wntmp2
  37.  
  38.  
  39.  
  40. # Create Working Directory
  41.  
  42. mkdir $DIR
  43.  
  44. # Extract Files From RCS
  45.  
  46. co -r$1 $PROGFILE
  47. chmod 755 $PROGFILE
  48. co $SUPPFILES
  49. co $DOCFILES
  50.  
  51.  
  52. # Pretty Print The Source Code
  53.  
  54. enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow $COLOR -ptconfpy.py.ps tconfpy.py
  55. enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow $COLOR -ptest-tc.py.ps test-tc.py
  56.  
  57. # Build Documentation
  58.  
  59. rman -fHTML -l tconfpy tconfpy.3 > tconfpy.html
  60. groff -man -Tps tconfpy.3 >tconfpy.ps
  61. gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=tconfpy.pdf tconfpy.ps
  62. groff -man -Tascii tconfpy.3 | col -xb >tconfpy.txt
  63.  
  64. rman -fHTML -l tconfpy test-tc.1 > test-tc.html
  65. groff -man -Tps test-tc.1 >test-tc.ps
  66. gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=test-tc.pdf test-tc.ps
  67. groff -man -Tascii test-tc.1 | col -xb >test-tc.txt
  68.  
  69. chmod 644 $DOCFILES *txt
  70. gzip *.1
  71. gzip *.3
  72.  
  73. # Build And Save The Release
  74.  
  75. mv $PROGFILE $SUPPFILES $DOCFILES $DIR
  76. mv *.gz $DIR
  77. rlog $PROGFILE >$DIR/CHANGELOG.txt
  78. flip -vm $DIR/*txt
  79.  
  80. tar -czvf $DIR.tar.gz $DIR
  81. mv $DIR.tar.gz Releases
  82.  
  83. # Remove Working Directory
  84. rm -rf $DIR
  85.  
  86.