# HG changeset patch # User Sascha L. Teichmann # Date 1394035077 -3600 # Node ID c4f1df6e88b0cdb5bdf7905095fa12620c949737 # Parent 265e1a46de074090364b107db24cfb52849c0c56 Renamed ssrodio to scripts diff -r 265e1a46de07 -r c4f1df6e88b0 scripts/d4e-website-loader.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/d4e-website-loader.sh Wed Mar 05 16:57:57 2014 +0100 @@ -0,0 +1,62 @@ +#!/bin/bash +# Copyright (C) 2014 by Intevation GmbH +# Author(s): +# Mathias Gebbe +# +# The Document Root of your projects website is available as: +# wald.intevation.org:/$PROJECT/htdocs/ +# so to list the contents of your projects Document root you can use: +# rsync $USER@wald.intevation.org:/$PROJECT/htdocs/ +# or to make a locale copy: +# rsync -vrl $USER@wald.intevation.org:/$PROJECT/htdocs/ $TARGET [should be an empty directory] +# to upload a new htdocs folder use: +# 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/ +# +# to load the latest d4e-website from repositroy use: hg clone https://scm.wald.intevation.org/hg/dive4elements/website/ + + +PROJECT=dive4elements + +function usage +{ + echo "usage: -u username -d destination [-h]" +} + + +##### Main + +while [ "$1" != "" ]; do + case $1 in + -u | --user ) shift + username=$1 + ;; + -d | --destination ) shift + destination=$1 + ;; + -h | --help ) usage + exit 0 + ;; + * ) usage + exit 1 + esac + shift +done + +if [ -z $username ];then + echo "Username:" + read username +fi + +if [ -z $destination ];then + echo "Destination (hit enter for current directory `pwd`/ [should be an empty directory]):" + read destination + if [ -z $destination ];then + destination=`pwd`+/ + fi +fi + +mkdir -p $destination +hg clone ssh://$username@scm.wald.intevation.org/hg/dive4elements/website/ $destination + +echo "run the following command to upload the website from repository" +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/" diff -r 265e1a46de07 -r c4f1df6e88b0 scritps/d4e-website-loader.sh --- a/scritps/d4e-website-loader.sh Wed Mar 05 16:49:25 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -#!/bin/bash -# Copyright (C) 2014 by Intevation GmbH -# Author(s): -# Mathias Gebbe -# -# The Document Root of your projects website is available as: -# wald.intevation.org:/$PROJECT/htdocs/ -# so to list the contents of your projects Document root you can use: -# rsync $USER@wald.intevation.org:/$PROJECT/htdocs/ -# or to make a locale copy: -# rsync -vrl $USER@wald.intevation.org:/$PROJECT/htdocs/ $TARGET [should be an empty directory] -# to upload a new htdocs folder use: -# 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/ -# -# to load the latest d4e-website from repositroy use: hg clone https://scm.wald.intevation.org/hg/dive4elements/website/ - - -PROJECT=dive4elements - -function usage -{ - echo "usage: -u username -d destination [-h]" -} - - -##### Main - -while [ "$1" != "" ]; do - case $1 in - -u | --user ) shift - username=$1 - ;; - -d | --destination ) shift - destination=$1 - ;; - -h | --help ) usage - exit 0 - ;; - * ) usage - exit 1 - esac - shift -done - -if [ -z $username ];then - echo "Username:" - read username -fi - -if [ -z $destination ];then - echo "Destination (hit enter for current directory `pwd`/ [should be an empty directory]):" - read destination - if [ -z $destination ];then - destination=`pwd`+/ - fi -fi - -mkdir -p $destination -hg clone ssh://$username@scm.wald.intevation.org/hg/dive4elements/website/ $destination - -echo "run the following command to upload the website from repository" -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/"