Last change
on this file since 398 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
|
Rev | Line | |
---|
[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 | #
|
---|
| 10 | DESTDIR=/var/www/html/mondo
|
---|
[370] | 11 | DESTMACH=www1.mondorescue.org
|
---|
| 12 | DESTUSER=apache
|
---|
| 13 | MONDODIR=/mondo/www/html/mondo
|
---|
[386] | 14 | TESTDIR=/mondo/www/html/test
|
---|
[360] | 15 |
|
---|
| 16 |
|
---|
| 17 | dname=`dirname $0`
|
---|
| 18 | prem=`echo $dname |cut -c1`
|
---|
| 19 | if [ ${prem} == "/" ]; then
|
---|
| 20 | export TOOLHOME=$dname
|
---|
| 21 | else
|
---|
| 22 | export TOOLHOME=${PWD}/$dname
|
---|
| 23 | fi
|
---|
| 24 |
|
---|
| 25 | . $TOOLHOME/common-env
|
---|
| 26 |
|
---|
| 27 | rm -rf $DESTDIR
|
---|
| 28 | cp -a ${BASE}/svn/${VER}/website $DESTDIR
|
---|
[366] | 29 | cp -a ${BASE}/svn/${VER}/documentation/* $DESTDIR/docs
|
---|
[360] | 30 | find $DESTDIR -type d | xargs chmod 755
|
---|
| 31 | find $DESTDIR -type f | xargs chmod 644
|
---|
[386] | 32 | cd $DESTDIR
|
---|
[374] | 33 | if [ _"$1" == _"" ]; then
|
---|
[370] | 34 | exit 0
|
---|
[386] | 35 | else
|
---|
| 36 | if [ _"$1" == _"test" ]; then
|
---|
| 37 | DESTDIR=$TESTDIR
|
---|
| 38 | else
|
---|
| 39 | DESTDIR=$MONDODIR
|
---|
| 40 | fi
|
---|
[370] | 41 | fi
|
---|
| 42 | tar cfj /tmp/mondo-www.tz2 .
|
---|
[386] | 43 | ssh ${DESTUSER}@${DESTMACH} "rm -rf ${DESTDIR} ; mkdir ${DESTDIR}"
|
---|
[370] | 44 | scp /tmp/mondo-www.tz2 ${DESTUSER}@${DESTMACH}:/tmp
|
---|
[386] | 45 | ssh ${DESTUSER}@${DESTMACH} "cd ${DESTDIR} ; tar xfj /tmp/mondo-www.tz2"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.