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