Author: soliton
Date: Thu Mar 27 22:01:28 2008
New Revision: 25208
URL: http://svn.gna.org/viewcvs/wesnoth?rev=25208&view=rev
Log:
* first generate the new files and then delete the old and move
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=25208&r1=25207&r2=25208&view=diff
==============================================================================
--- trunk/utils/update_unit_tree (original)
+++ trunk/utils/update_unit_tree Thu Mar 27 22:01:28 2008
@@ -10,7 +10,7 @@
SOURCE=$HOME/source
if ! [ -d $SOURCE ]; then
- echo "$SOURCE not found."
+ echo "'$SOURCE' not found."
exit 1
fi
@@ -18,23 +18,20 @@
case $VERSION in
1.2 ) cd $SOURCE/1.2 || exit 1
BRANCH=Stable
- rm -rf $SITE/$VERSION
;;
1.3.* ) cd $SOURCE/trunk || exit 1
;;
1.4 ) cd $SOURCE/1.4 || exit 1
BRANCH=Stable
- rm -rf $SITE/$VERSION
;;
trunk ) cd $SOURCE/trunk || exit 1
- rm -rf $SITE/$VERSION
;;
* ) echo "Unknown version."
exit 1
;;
esac
-if [ -d $SITE/$VERSION ]; then
- echo "$SITE/$VERSION already exists."
+if [ -d $SITE/$VERSION ] && [ "$BRANCH" != "Stable" ] && [ "$VERSION" !=
"trunk" ]; then
+ echo "'$SITE/$VERSION' already exists."
exit 1
fi
#echo 'svn update...'
@@ -48,6 +45,7 @@
sed -i -e "s/\(my \$version = '\).*\(';\)/\1$VERSION\2/" units.pl
fi
./units.pl
+rm -rf $SITE/$VERSION
# move the generated files to their proper place
mv files $SITE/$VERSION
cp -p templates/units.css $SITE/$VERSION
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits