source: dasscm/trunk/dasscm_remote_update.sh@ 835

Last change on this file since 835 was 804, checked in by joergs, on Dec 13, 2009 at 3:31:40 PM

added script that allow some repository management functions without the need to install dasscm on the target system

  • 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.