Author: soliton
Date: Fri Apr  4 01:16:50 2008
New Revision: 25524

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25524&view=rev
Log:
* don't add a new link for existing entries

Modified:
    trunk/utils/update_unit_tree

Modified: trunk/utils/update_unit_tree
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/update_unit_tree?rev=25524&r1=25523&r2=25524&view=diff
==============================================================================
--- trunk/utils/update_unit_tree (original)
+++ trunk/utils/update_unit_tree Fri Apr  4 01:16:50 2008
@@ -38,12 +38,12 @@
 #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


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to