don't add a new link for existing entries

This commit is contained in:
Gunter Labes 2008-04-03 23:16:50 +00:00
parent 1cb846df7a
commit 9a03c80214

View file

@ -38,12 +38,12 @@ fi
#svn update
#svn status
cd data/tools/unit_tree/ || exit 1
if [ "$VERSION" != "trunk" ]; then
if [ "$VERSION" != "trunk" ] && ! [ $(grep "<p><a href=\"$VERSION/index.html\">$VERSION ($BRANCH)</a></p>" $SITE/index.html) ]; then
# insert a link for the new version
sed -i -e "s,\(<p><a href=\"trunk/index.html\">Trunk</a></p>\),\1\n<p><a href=\"$VERSION/index.html\">$VERSION ($BRANCH)</a></p>," $SITE/index.html
# make sure we update with the right version
sed -i -e "s/\(my \$version = '\).*\(';\)/\1$VERSION\2/" units.pl
fi
# make sure we update with the right version
sed -i -e "s/\(my \$version = '\).*\(';\)/\1$VERSION\2/" units.pl
./units.pl || exit 1
rm -rf $SITE/$VERSION
# move the generated files to their proper place