#!/bin/bash # # Prepare a delivery of a new version by changing VERSION/TAG from stable # # $Id$ # # Syntax: mknewversion # dname=`dirname $0` prem=`echo $dname |cut -c1` if [ _${prem} = _"/" ]; then export TOOLHOME=$dname else export TOOLHOME=${PWD}/$dname fi # We need to get $VER if [ "$1" = "" ]; then echo "Syntax: mknewversion version" exit -1 else VER=$1 shift fi grep -q stable $TOOLHOME/../mondo/VERSION if [ $? -ne 0 ]; then echo "A new version can only be made from stable" exit -1 fi nb=`svn diff $TOOLHOME/.. | wc -l` if [ $nb -gt 0 ]; then echo "You'll have to check in before changing version" exit -1 fi echo "Copying the stable version to ${VER}" svn copy $SVN_M/branches/stable $SVN_M/branches/${VER} -m "Creation of mondo ${VER} from stable" cd $TOOLHOME/../.. svn co $SVN_M/branches/${VER} ${VER} cd ${VER} for p in mindi mondo mondo-doc mindi-kernel mindi-busybox; do # Reset TAG - This maybe an issue for mindi-busybox only echo "1" > $p/TAG v=$VER echo $p | grep -q mindi if [ $? -eq 0 ]; then echo "Please give new $p version for this $VER mondo version ? " read v fi echo "$v" > $p/VERSION done svn ci -m "VERSION and TAG update" svn up