source: trunk/tools/livwww @ 387

Last change on this file since 387 was 387, checked in by bcornec, 14 years ago

merge -r372:374 $SVN_M/branches/stable
merge -r384:386 $SVN_M/branches/stable

  • Property svn:executable set to *
File size: 975 bytes
Line 
1#!/bin/bash
2#
3# $Id$
4#
5# Delivery of the Web site in a DocumentRoot
6#
7#
8# Please replace with your destination
9#
10DESTDIR=/var/www/html/mondo
11DESTMACH=www1.mondorescue.org
12DESTUSER=apache
13MONDODIR=/mondo/www/html/mondo
14TESTDIR=/mondo/www/html/test
15
16
17dname=`dirname $0`
18prem=`echo $dname |cut -c1`
19if [ ${prem} == "/" ]; then
20        export TOOLHOME=$dname
21else
22        export TOOLHOME=${PWD}/$dname
23fi
24
25. $TOOLHOME/common-env
26
27rm -rf $DESTDIR
28cp -a ${BASE}/svn/${VER}/website $DESTDIR
29cp -a ${BASE}/svn/${VER}/documentation/* $DESTDIR/docs
30find $DESTDIR -type d | xargs chmod 755
31find $DESTDIR -type f | xargs chmod 644
32cd $DESTDIR
33if [ _"$1" == _"" ]; then
34        exit 0
35else
36    if [ _"$1" == _"test" ]; then
37        DESTDIR=$TESTDIR
38    else
39        DESTDIR=$MONDODIR
40    fi
41fi
42tar cfj /tmp/mondo-www.tz2 .
43ssh ${DESTUSER}@${DESTMACH} "rm -rf ${DESTDIR} ; mkdir ${DESTDIR}"
44scp /tmp/mondo-www.tz2 ${DESTUSER}@${DESTMACH}:/tmp
45ssh ${DESTUSER}@${DESTMACH} "cd ${DESTDIR} ; tar xfj /tmp/mondo-www.tz2"
Note: See TracBrowser for help on using the repository browser.