comparison scritps/d4e-website-loader.sh @ 31:c66f4b393d15

Added index.php for Python Server Pages Added .htaccess to overwrite Apaches directory indexing Added scritps/d4e-website-loader.sh to upload website to wald.intevation.org
author Mathias Gebbe <mgebbe@intevation.de>
date Mon, 03 Mar 2014 11:34:30 +0100
parents
children 265e1a46de07
comparison
equal deleted inserted replaced
30:c69b8e62172f 31:c66f4b393d15
1 #!/bin/bash
2 # Copyright (C) 2014 by Intevation GmbH
3 # Author(s):
4 # Mathias Gebbe <mgebbe@intevation.de>
5 #
6 # The Document Root of your projects website is available as:
7 # wald.intevation.org:/$PROJECT/htdocs/
8 # so to list the contents of your projects Document root you can use:
9 # rsync $USER@wald.intevation.org:/$PROJECT/htdocs/
10 # or to make a locale copy:
11 # rsync -vrl $USER@wald.intevation.org:/$PROJECT/htdocs/ $TARGET [should be an empty directory]
12 # to upload a new htdocs folder use:
13 # rsync -rvPC --perms --chmod=ug+rw,o+r,Dg+s,Da+x,u-s,Fg-s,o-wt --exclude '*.swp' --delete ./website/* $username@wald.intevation.org:/$PROJECT/htdocs/
14 #
15 # to load the latest d4e-website from repositroy use: hg clone https://scm.wald.intevation.org/hg/dive4elements/website/
16
17
18 PROJECT=dive4elements
19
20 function usage
21 {
22 echo "usage: -u username -d destination [-h]"
23 }
24
25
26 ##### Main
27
28 while [ "$1" != "" ]; do
29 case $1 in
30 -u | --user ) shift
31 username=$1
32 ;;
33 -d | --destination ) shift
34 destination=$1
35 ;;
36 -h | --help ) usage
37 exit 0
38 ;;
39 * ) usage
40 exit 1
41 esac
42 shift
43 done
44
45 if [ -z $username ];then
46 echo "Username:"
47 read username
48 fi
49
50 if [ -z $destination ];then
51 echo "Destination (hit enter for current directory `pwd` [should be an empty directory]):"
52 read destination
53 if [ -z $destination ];then
54 destination=`pwd`
55 fi
56 fi
57
58 hg clone ssh://$username@scm.wald.intevation.org/hg/dive4elements/website/ $destination
59
60 echo "run the following command to upload the website from repository"
61 echo "rsync -rvPC --perms --chmod=ug+rw,o+r,Dg+s,Da+x,u-s,Fg-s,o-wt --exclude '*.swp' --delete $destination/* $username@wald.intevation.org:/$PROJECT/htdocs/"
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)