update to handle version 1.4

This commit is contained in:
Gunter Labes 2008-03-03 05:12:32 +00:00
parent d89f875c72
commit 2bcb93b976

View file

@ -8,20 +8,23 @@ fi
VERSION=$1
SITE=$HOME/public_html
SOURCE=$HOME/source
TRUNK=$SOURCE/trunk/
STABLE=$SOURCE/1.2/
if ! [ -d $SOURCE ]; then
echo "$SOURCE not found."
exit 1
fi
BRANCH=Development
case $VERSION in
1.2 ) cd $STABLE || exit 1
1.2 ) cd $SOURCE/1.2 || exit 1
BRANCH=Stable
;;
1.3.* ) cd $TRUNK || exit 1
1.3.* ) cd $SOURCE/trunk || exit 1
;;
trunk ) cd $TRUNK || exit 1
1.4 ) cd $SOURCE/1.4 || exit 1
BRANCH=Stable
;;
trunk ) cd $SOURCE/trunk || exit 1
rm -rf $SITE/$VERSION
;;
* ) echo "Unknown version."
@ -38,7 +41,7 @@ svn status
cd data/tools/unit_tree/ || exit 1
if [ "$VERSION" != "trunk" ]; then
# insert a link for the new version
sed -i -e "s,\(<p><a href=\"trunk/index.html\">Trunk</a></p>\),<p><a href=\"$VERSION/index.html\">Development ($VERSION)</a></p>\n\1," $SITE/index.html
sed -i -e "s,\(<p><a href=\"trunk/index.html\">Trunk</a></p>\),<p><a href=\"$VERSION/index.html\">$VERSION ($BRANCH)</a></p>\n\1," $SITE/index.html
# make sure we update with the right version
sed -i -e "s/\(my \$version = '\).*\(';\)/\1$VERSION\2/" units.pl
fi