/[gzz]/gzz/sync-remote-private.sh
ViewVC logotype

Diff of /gzz/sync-remote-private.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by tjl, Sun Apr 7 19:43:06 2002 UTC revision 1.2 by tuukkah, Fri Sep 27 16:06:32 2002 UTC
# Line 2  Line 2 
2    
3  set -e  set -e
4    
5  TMP=privatecopy  TMP=../ms-rsync-cache
6    
7  cleanup() {  cleanup() {
8          ssh gzzpriv@himalia.it.jyu.fi "sh -vc 'chmod 700 .lock ; rm -f .lock'"          ssh gzzpriv@himalia.it.jyu.fi "sh -vc 'chmod 700 .lock ; rm -f .lock'"
9  }  }
10    
11  if [ "$1" = "cleanup" ]; then cleanup; exit; fi  if [ "$1" = "cleanup" ]; then
12            cleanup
13            exit
14    elif [ "$2" = "purgecache" ]; then
15            rm -R "$TMP"
16            exit
17    fi
18    
19    # XXX makes no sense. Maybe we should require non-empty parameters?
20  MS="$1"  MS="$1"
21  MSREMOTE="$2"  MSREMOTE="$2"
22  if [ "$1" != "" ]; then MS="$1"; fi  if [ "$1" != "" ]; then MS="$1"; fi
# Line 22  ssh gzzpriv@himalia.it.jyu.fi lockfile - Line 29  ssh gzzpriv@himalia.it.jyu.fi lockfile -
29  trap cleanup EXIT  trap cleanup EXIT
30  echo "Success."  echo "Success."
31  rsync --rsh=ssh -rtvz gzzpriv@himalia.it.jyu.fi:$MSREMOTE/ $TMP/$MSREMOTE/  rsync --rsh=ssh -rtvz gzzpriv@himalia.it.jyu.fi:$MSREMOTE/ $TMP/$MSREMOTE/
32  ${JAVA:-java} gzz.client.Synch -dir $MS -dir $TMP/$MSREMOTE  
33    # XXX We need Synch when we start to have pointer conflicts
34    # ${JAVA:-java} gzz.client.Synch -dir $MS -dir $TMP/$MSREMOTE
35    # For now, simply update blocks to both directions
36    # Also, local pools must use dirstorer.maxlen=255
37    rsync -rt $TMP/$MSREMOTE/ $MS/
38    rsync -rt $MS/ $TMP/$MSREMOTE/
39    
40  rsync --rsh=ssh -rtvz $TMP/$MSREMOTE/ gzzpriv@himalia.it.jyu.fi:$MSREMOTE/  rsync --rsh=ssh -rtvz $TMP/$MSREMOTE/ gzzpriv@himalia.it.jyu.fi:$MSREMOTE/

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26