source: dasscm/trunk/usr/bin/dasscm_remote_update.sh@ 1020

Last change on this file since 1020 was 882, checked in by joergs, on Jun 15, 2010 at 6:31:11 PM

moved to subdirectories

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2
3# dasscm_remote_update is intended for systems
4# where a local dasscm installation is not possible
5# but ssh and rsync is available.
6# In this case,
7# the files from the local repository checkout
8# are updated to the current content.
9# Use only, if a local dasscm installation is not possbile!
10
11usage()
12{
13echo "
14 usage: $0 hostname
15 hostname must be identical with the repository path
16"
17exit 1
18}
19
20#DRYRUN="--dry-run"
21# without one-file-system, a lot of warings are produced for /proc etc.
22ONEFILESYSTEM="--one-file-system"
23
24OPTIONS="$DRYRUN $ONEFILESYSTEM"
25
26REMOTE_USER="root"
27
28SERVER=$1
29
30if [ -z "$SERVER" ]; then
31 usage
32fi
33
34if [ ! -d "$SERVER" ]; then
35 echo
36 echo " failed to access directory $SERVER"
37 usage
38fi
39
40# start at an current repository checkout of morbo.
41# only already existing files will be updated.
42# If you want to add more files,
43# create the file in the repository and re-run this script
44svn up $SERVER || (echo "failed to update repository $SERVER"; usage)
45rsync -av --existing $OPTIONS $REMOTE_USER@$SERVER:/. . || (echo "failed to access server $SERVER via ssh/rsync"; usage)
46echo "updated file must be commited manually"
Note: See TracBrowser for help on using the repository browser.