Commit 8c9af9e1 authored by Giuseppe Terrasi's avatar Giuseppe Terrasi

parents ede04274 8efd147d
#!/bin/bash #!/bin/bash
WEB=/srv/chiedi.ubuntu-it.org WEB=/srv/chiedi.ubuntu-it.org
WWW=$WEB/www/osqa/ WWW=$WEB/www/osqa/
BZR=/srv/shared-branches BZR=/srv/shared-branches
BZRWWW=$BZR/ubuntu-it-ask/ BZRWWW=$BZR/ubuntu-it-ask/
TMP_FILE=/tmp/askrepo_version TMP_FILE=/tmp/askrepo_version
cp -ax $BZRWWW/* $WWW/ function set_own_perm {
chown -R :ubuntu-it $WWW
chmod -R ug+rw $WWW
}
trap set_own_perm EXIT HUP QUIT TERM KILL
if ! test -f $TMP_FILE ; then if [ ! -f $TMP_FILE ]
cat /dev/null > $TMP_FILE then
touch $TMP_FILE
fi fi
cd $BZRWWW cd $BZRWWW
VERSION=`cat $TMP_FILE` OLD_VERSION=`cat $TMP_FILE`
VERSION_TEST=`bzr up 2>&1 | tail -n1 ` NEW_VERSION=`bzr up 2>&1 | tail -n1`
if [ ! "$VERSION_TEST" = "$VERSION" ] ; then if [ ! "$NEW_VERSION" == "$OLD_VERSION" ]
echo "$VERSION_TEST" > $TMP_FILE then
echo "$NEW_VERSION" > $TMP_FILE
cp -ax $BZRWWW/* $WWW/
fi fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment