Newer
Older
twander / mktwander
#!/bin/sh
# Build a release of twander
# $Id: mktwander,v 1.19 2003/02/12 20:20:32 tundra Exp $

COLOR=
#COLOR=--color
PROGFILE="twander.py"
SUPPFILES="Makefile twander.1 twander-license.txt .twander"
DOCFILES="twander.html twander.pdf twander.ps twander.py.ps READ-1ST.txt WHATSNEW.txt twander.txt"

# Check Command Line Args

DIR="twander-"$1

if [ $# -ne 1 ]
    then
	echo "usage: mktwander version-number"
	exit
fi

# Create Working Directory 

mkdir $DIR

# Extract Files From RCS

co -r$1 $PROGFILE
chmod 755 $PROGFILE
co $SUPPFILES
co $DOCFILES

# Pretty Print The Source Code

enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow $COLOR  -ptwander.py.ps twander.py

# Build Documentation

rman -fHTML -l twander twander.1 >twander.html
groff -man -Tps twander.1 >twander.ps
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=twander.pdf twander.ps
groff -man -Tascii twander.1 | col -xb >twander.txt
chmod 644 $DOCFILES *.txt
gzip *.1

# Build And Save The Release

mv $PROGFILE $SUPPFILES $DOCFILES $DIR
mv *.gz $DIR
rlog twander.py >$DIR/CHANGELOG.txt
flip -vm $DIR/*txt
tar -czvf $DIR.tar.gz $DIR
mv $DIR.tar.gz Releases

# Remove Working Directory
rm -rf $DIR