release=$1

if test "$release" == ""; then
  echo "Give a release number"
  exit 1
fi


if test `uname -s` == Linux; then
  tag=TAG:bundle-5.0-r$release-linux

  curtag=`egrep TAG:.*linux README`
else
  tag=TAG:bundle-5.0-r$release-osx

  curtag=`egrep TAG:.*osx README`
fi

if test "$curtag" = ""; then
  echo "current TAG: not found in README, please add it"
  exit
fi

sed -e "s/$curtag/$tag/" README > README.
mv -f README. README

echo "Tag as $tag ? (^C to cancel)"
read
echo "commiting..."
svn commit README -m $tag
