Last change
on this file since 864 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 |
|
---|
11 | usage()
|
---|
12 | {
|
---|
13 | echo "
|
---|
14 | usage: $0 hostname
|
---|
15 | hostname must be identical with the repository path
|
---|
16 | "
|
---|
17 | exit 1
|
---|
18 | }
|
---|
19 |
|
---|
20 | #DRYRUN="--dry-run"
|
---|
21 | # without one-file-system, a lot of warings are produced for /proc etc.
|
---|
22 | ONEFILESYSTEM="--one-file-system"
|
---|
23 |
|
---|
24 | OPTIONS="$DRYRUN $ONEFILESYSTEM"
|
---|
25 |
|
---|
26 | REMOTE_USER="root"
|
---|
27 |
|
---|
28 | SERVER=$1
|
---|
29 |
|
---|
30 | if [ -z "$SERVER" ]; then
|
---|
31 | usage
|
---|
32 | fi
|
---|
33 |
|
---|
34 | if [ ! -d "$SERVER" ]; then
|
---|
35 | echo
|
---|
36 | echo " failed to access directory $SERVER"
|
---|
37 | usage
|
---|
38 | fi
|
---|
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
|
---|
44 | svn up $SERVER || (echo "failed to update repository $SERVER"; usage)
|
---|
45 | rsync -av --existing $OPTIONS $REMOTE_USER@$SERVER:/. . || (echo "failed to access server $SERVER via ssh/rsync"; usage)
|
---|
46 | echo "updated file must be commited manually"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.