#!/bin/sh make clean VERSION=`grep "^#define VERSION" pipemeter.c | head -n1 | cut -d\" -f2` SAVEPWD=$PWD echo -n Packaging Version $VERSION ... sed "s/^%define version .*/%define version $VERSION/" pipemeter.spec >spec.$$ mv spec.$$ pipemeter.spec # use cvs to tag and export. :-D CVSVER=`echo $VERSION | sed -e 's/\./_/g'` CVSTAG="RELEASE_$CVSVER" echo Tagging release with $CVSTAG cvs tag -c $CVSTAG || exit 1 cd .. cvs export -r $CVSTAG -d pipemeter-$VERSION pipemeter tar zcvf pipemeter-$VERSION.tar.gz pipemeter-$VERSION echo done