mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Add stats updating script to development/tools/.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38659 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3cc6e03378
commit
30864d048f
57
development/tools/updatestats.sh
Normal file
57
development/tools/updatestats.sh
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# A script to update the LyX i18n.inc statistics
|
||||||
|
|
||||||
|
FARM="/cvs/lyx-www/farm/cookbook/LyX";
|
||||||
|
|
||||||
|
# Sanity check
|
||||||
|
if [ ! -f "$FARM/i18n.php" ]; then
|
||||||
|
echo "$FARM does not look like LyX's www tree!";
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get us to the root of the tree we are in.
|
||||||
|
MYDIR=${0%updatestats.sh};
|
||||||
|
if [ -n "$MYDIR" ]; then
|
||||||
|
cd $MYDIR;
|
||||||
|
fi
|
||||||
|
LYXROOT=$(pwd);
|
||||||
|
cd ../../;
|
||||||
|
|
||||||
|
# Are we in trunk or branch?
|
||||||
|
TRUNK="TRUE";
|
||||||
|
if ls status.* 2>/dev/null | grep -q status; then
|
||||||
|
TRUNK="";
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Sanity check
|
||||||
|
if ! cd po/; then
|
||||||
|
echo "Cannot cd to po/ directory!";
|
||||||
|
pwd
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo Running make i18n.inc...
|
||||||
|
make i18n.inc;
|
||||||
|
if [ -n "$TRUNK" ]; then
|
||||||
|
mv i18n.inc i18n_trunk.inc
|
||||||
|
I18NFILE=i18n_trunk.inc;
|
||||||
|
else
|
||||||
|
I18NFILE=i18n.inc;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! cd $FARM; then
|
||||||
|
echo "Unable to cd to $FARM!";
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo Updating the www-user tree...
|
||||||
|
svn up
|
||||||
|
|
||||||
|
echo Copying $I18NFILE...;
|
||||||
|
cp $LYXROOT/po/$I18NFILE .;
|
||||||
|
|
||||||
|
echo Committing...;
|
||||||
|
svn commit -m "* $I18NFILE: update stats" $I18NFILE;
|
||||||
|
|
||||||
|
echo DONE!
|
Loading…
Reference in New Issue
Block a user