#!/bin/bash # author: Jeffrey Bakker # I've made this shell script for myself so I could quickly and # easily make distributions of webcpp releases. if [ "$1" = "" ]; then echo "You must provide the version number of the distribution." echo "Example: $ ./mkrelease 0.1.1" exit 0 fi NAME="webcpp-$1" # make source distribution ------------------------------------ function mksrcdist { cd .. mkdir -p $1-src cp -R -d webcpp/* $1-src tar -czvf $1-src.tar.gz $1-src rm -rf $1-src cd ./webcpp echo "Source distribution $1-src.tar.gz has been made." } #-------------------------------------------------------------- # make executable distribution -------------------------------- function mkexedist { cd .. ./makeself.sh --nox11 webcpp $1-setup.run $1 ./setup cd ./webcpp echo "$USER, the executable distribution has been made" } #-------------------------------------------------------------- # make binary distribution ------------------------------------ function mkbindist { ./configure --target=i386 && make mkdir -p $1-i386 mkdir -p $1-i386/themes mkdir -p $1-i386/backgrounds cp ChangeLog ./$1-i386 cp COPYING ./$1-i386 cp AUTHORS ./$1-i386 cp TODO ./$1-i386 cp ./webcpp/webcpp ./$1-i386 cp ./docs.html ./$1-i386 cp ./webcpp/webc++ ./$1-i386/webc++ cp ./webcpp/themes/*.scs ./$1-i386/themes cp ./webcpp/themes/*.Scs2 ./$1-i386/themes cp ./webcpp/backgrounds/*.bmp ./$1-i386/backgrounds tar -czvf ../$1-linux.i386.tar.gz $1-i386 rm -rf $1-i386 echo "Binary Distribution $1 has been made" } #-------------------------------------------------------------- webcpp ChangeLog changes.html:f -m make distclean mksrcdist $NAME mkexedist $NAME mkbindist $NAME make distclean exit