From 081011f386915bd037a3569e46ed5e4f10c490da Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 28 Jun 2005 23:44:19 +0000 Subject: 29.06.2005 --- release | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 release (limited to 'release') diff --git a/release b/release new file mode 100755 index 0000000..c67f009 --- /dev/null +++ b/release @@ -0,0 +1,51 @@ +#! /bin/bash + +rm -f core.* + +RDIR=~/releases +NAME=librcc + + +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)?)/) { print \\$1; } }"` +cvs=`cat VERSION | perl -e "while () { if (m/\d\.\d(.\d)?.*(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 + make clean -C examples + rm -rf autom4te*.cache + rm -rf "{arch}" + rm -rf `find . -name .arch-ids` + rm -rf `find . -name .deps` + cd .. + if [ -a $rname.tar.bz2 ]; then + rm -f $rname.tar.bz2 + fi + tar cjf $rname.tar.bz2 $rname + rm -rf $rname +) -- cgit v1.2.3