comparison scripts/d4e-website-loader.sh @ 38:c4f1df6e88b0

Renamed ssrodio to scripts
author Sascha L. Teichmann <teichmann@intevation.de>
date Wed, 05 Mar 2014 16:57:57 +0100
parents scritps/d4e-website-loader.sh@265e1a46de07
children
comparison
equal deleted inserted replaced
37:265e1a46de07 38:c4f1df6e88b0
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 mkdir -p $destination
59 hg clone ssh://$username@scm.wald.intevation.org/hg/dive4elements/website/ $destination
60
61 echo "run the following command to upload the website from repository"
62 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)