Newer
Older
twander / mktwander
#!/bin/sh
# Build a release of twander
# $Id: mktwander,v 1.6 2002/12/19 22:12:55 tundra Exp $

PROGFILE="twander.py"
SUPPFILES="Makefile twander.1 twander-license.txt .twander"
DOCFILES="twander.html twander.ps twander.py.ps 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
co $SUPPFILES

# Build Documentation

groff -man -Thtml twander.1 >twander.html
groff -man -Tps twander.1 >twander.ps
groff -man -Tascii twander.1 | col -xb >twander.txt
chmod 644 $DOCFILES
flip -vm *txt
gzip *.1

# Pretty Print The Source Code

enscript -Epython -fCourier8 -ptwander.py.ps twander.py

# Build And Save The Release

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

# Remove Working Directory

rm -rf $DIR