#!/bin/sh PNAME=JRI SWD=`pwd` echo "Removing previous dist ..." rm -rf /tmp/${PNAME} echo "Copying package base ..." cp -r ../${PNAME} /tmp rm -f /tmp/${PNAME}/mkdist cd /tmp/${PNAME} echo "Running autoconf ..." rm -rf autom4te* acloc* autoreconf #autoheader #autoconf rm -rf autom4te* acloc* echo "Compiling getsp ..." if [ ! -e tools/getsp.class ]; then cd tools javac -target 1.2 -source 1.2 getsp.java cd .. fi echo "Removing CVS/SVN and backup stuff ..." find . -name CVS -or -name .svn | xargs rm -rf find . -name \*~ | xargs rm -f echo "Updating version ..." VER=`awk -v ORS= '/JRI v/ { print substr($6,2) }' src/jri.h` echo "$PNAME version ${VER}" # cat DESCRIPTION| sed "s/Version:.*/Version: ${VER}/" > d # mv d DESCRIPTION echo "Creating package ..." cd .. tar fcz ${PNAME}_${VER}.tar.gz ${PNAME} cd ${SWD} cp /tmp/${PNAME}_${VER}.tar.gz .. rm -rf /tmp/${PNAME} echo "Done." ls -l ../${PNAME}_${VER}.tar.gz