source: MondoRescue/branches/stable/tools/livwww@ 386

Last change on this file since 386 was 386, checked in by bcornec, 18 years ago

Most of Andree's remarks are now there

  • Property svn:executable set to *
File size: 975 bytes
RevLine 
[360]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
[370]11DESTMACH=www1.mondorescue.org
12DESTUSER=apache
13MONDODIR=/mondo/www/html/mondo
[386]14TESTDIR=/mondo/www/html/test
[360]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
[366]29cp -a ${BASE}/svn/${VER}/documentation/* $DESTDIR/docs
[360]30find $DESTDIR -type d | xargs chmod 755
31find $DESTDIR -type f | xargs chmod 644
[386]32cd $DESTDIR
[374]33if [ _"$1" == _"" ]; then
[370]34 exit 0
[386]35else
36 if [ _"$1" == _"test" ]; then
37 DESTDIR=$TESTDIR
38 else
39 DESTDIR=$MONDODIR
40 fi
[370]41fi
42tar cfj /tmp/mondo-www.tz2 .
[386]43ssh ${DESTUSER}@${DESTMACH} "rm -rf ${DESTDIR} ; mkdir ${DESTDIR}"
[370]44scp /tmp/mondo-www.tz2 ${DESTUSER}@${DESTMACH}:/tmp
[386]45ssh ${DESTUSER}@${DESTMACH} "cd ${DESTDIR} ; tar xfj /tmp/mondo-www.tz2"
Note: See TracBrowser for help on using the repository browser.