#! /bin/bash rm -f core.* RDIR=~/releases NAME=librcd if [ ! -d $RDIR ]; then if [ -a $RDIR ]; then echo "Release directory isn't a directory!" exit fi mkdir -p $RDIR fi version=`cat VERSION | perl -e "while () { if (m/(\d\.\d(.\d{1,2})?)/) { print \\$1; } }"` cvs=`cat VERSION | perl -e "while () { if (m/\d\.\d(.\d{1,2})?.*(cvs|CVS|Cvs)/) { print 'cvs'; } }"` if [ "$cvs" == "cvs" ]; then rname="$NAME-`date +%y%m%d.%H`" else rname="$NAME-$version"; fi if [ -d $RDIR/$rname ]; then rm -rf $RDIR/$rname fi mkdir -p $RDIR/$rname if [ ! -d $RDIR/$rname ]; then echo "Can't create directory!!!" exit fi cp -a * $RDIR/$rname #cp -al * $RDIR/$rname ( cd $RDIR/$rname ./autogen.sh ./configure make clean distclean distclean-am make clean -C examples make clean -C statgen rm -rf autom4te*.cache rm -rf "{arch}" rm -rf `find . -name .arch-ids` # rm -rf `find . -name .deps` # rm -f config.log config.status rm -rf debian cd .. if [ -a $rname.tar.bz2 ]; then rm -f $rname.tar.bz2 fi tar cjf $rname.tar.bz2 $rname rm -rf $rname scp $rname.tar.bz2 csa@dside.dyndns.org:/home/csa/public_html/files/rusxmms/ )