| 1 |
#!/bin/sh
|
| 2 |
|
| 3 |
umask 002
|
| 4 |
|
| 5 |
REPOS=$1
|
| 6 |
REV=$2
|
| 7 |
URL_REPOS="svn://svn.debian.org/svn/debian-med/trunk/community/website/"
|
| 8 |
BASE=/var/lib/gforge/chroot/home/groups/debian-med
|
| 9 |
|
| 10 |
echo "Updating website... rev. $REV"
|
| 11 |
mv $BASE/htdocs/* $BASE/htdocs-backup/ && rm -rf $BASE/htdocs/*
|
| 12 |
svn --force export $URL_REPOS $BASE/htdocs/
|
| 13 |
[ "x$?" == "x0" ] && rm -rf $BASE/htdocs-backup/*
|
| 14 |
|
| 15 |
# let's substitute our variables...
|
| 16 |
AUTH=$(svnlook author $REPOS -r $REV | sed 's/\&/\&/g;s/</\</g;s/>/\>/g')
|
| 17 |
|
| 18 |
sed -e "s/#REV#/$REV/" \
|
| 19 |
-e "s/#DATE#/`date -uR`/" \
|
| 20 |
-e "s/#AUTHOR#/$AUTH/g" -i $BASE/htdocs/inc/footer.inc.php
|
| 21 |
|
| 22 |
# Auto-compile .po files
|
| 23 |
LOCALES="$BASE/htdocs/locale"
|
| 24 |
|
| 25 |
for lang in $(find $LOCALES -mindepth 1 -maxdepth 1 -type d)
|
| 26 |
do
|
| 27 |
msgfmt $lang/LC_MESSAGES/messages.po && mv messages.mo $lang/LC_MESSAGES/
|
| 28 |
done
|