/[debian-med]/trunk/community/infrastructure/scripts/update-website
ViewVC logotype

Contents of /trunk/community/infrastructure/scripts/update-website

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1258 - (show annotations) (download)
Sat Feb 2 12:12:23 2008 UTC (5 years, 4 months ago) by hanska-guest
File size: 801 byte(s)
Putting scripts under SVN, let's hope it works
(post-commit hook already edited :)
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/\&/\&amp;/g;s/</\&lt;/g;s/>/\&gt;/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

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5