#!/bin/bash set -x project="pandalex" # This script makes the world nice-looking for the world. cvs up cvs commit # Name of the release? echo -n "Release name (e.g) $project-0.4.1: " read relname echo -n "Tag this release (y/n)? " read tag if [ $tag = "y" ] then echo -n "CVS tag name (e.g) $project-release-041: " read tagname cvs tag -b $tagname fi # Get a clean copy of the source rm -rf temp mkdir temp cd temp export CVSROOT="/home/httpd/html/cvs" cvs co $project cd $project # Clean out the old documentation echo "------------------------------------------------------------------------" echo "Updating documentation" rm man/*sgml man/*man # Generate the new documentation for item in `ls *.c` do ~mikal/opensource/autodocbook/autodocbook $item man done mv *.3 man/ cvs up cvs commit # Autotools echo "------------------------------------------------------------------------" echo "Running the autotools" libtoolize --force aclocal automake --add-missing autoconf ./configure make clean make # Make sure that the release passes some simple dmalloc tests echo "------------------------------------------------------------------------" echo "Checking for memory leaks" #dmalloc -b -l log -i 100 low #cd examples #./pandademo > /dev/null # #if [ `grep "not freed" log | wc -l | tr -d " "` -gt 0 ] #then # echo "" # echo "" # echo "Prospective release failed the memory leak test" # exit 42 #fi #cd .. # Get rid of core files echo "------------------------------------------------------------------------" echo "Clean up" make clean for item in `find . | grep core` do rm -i $item done # Get rid of compiled files that make clean wont remove find . -name "*obj" -type f -exec rm -i {} \; -print # Get rid of the timetrials -- they are too big rm -rf timetrials rm -rf testdata delname="Makefile config.cache config.log config.status logfile math config.h output.pdf .deps $project.ncb $project.opt autom4te.cache" # Get rid of makefiles for filename in $delname do for item in `find . -name $filename -print` do rm -rf $item done done # How much space do we use? echo "------------------------------------------------------------------------" echo "Release takes" `du -sk` "kbytes" # Now we can start packaging the various versions cd .. mkdir $relname # Windows is simply everything cp -R $project/* $relname/ # Compress them all tar czf `echo $relname | sed 's/-/_/g' | sed 's/\./_/g'`.tgz $relname # Sign them all gpg --detach-sign --armour --output `echo $relname | sed 's/-/_/g' | sed 's/\./_/g'`.sig `echo $relname | sed 's/-/_/g' | sed 's/\./_/g'`.tgz # Now deal with the RPMS echo "Remember to email editor@planetpdf.com"