source: soft/build_system/build_system/upload/robot/trunk/push-rsync @ 1

Last change on this file since 1 was 1, checked in by fasma, 13 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 886 bytes
Line 
1#!/bin/sh
2
3# config variables:
4#   RSYNC_HOST
5#   RSYNC_SOURCE
6#   RSYNC_DEST
7#   RSYNC_OPTIONS
8#   PRIVATE_MEDIA
9#   ARCHS
10#   VERSIONS
11
12CONFIG=$1
13if [ -z "$CONFIG" ]; then
14    echo "usage: $0 <config file>"
15    exit 1
16fi
17
18. $CONFIG
19
20. $HOME/robot/robot-ping $RSYNC_HOST
21
22for m in $PRIVATE_MEDIA; do
23    RSYNC_OPTIONS="$RSYNC_OPTIONS --exclude *"$m"*"
24done
25
26for v in $VERSIONS; do
27    rsync $RSYNC_OPTIONS -e 'ssh -xc arcfour -o Compression=no' --delete-after $RSYNC_SOURCE/$v/ $RSYNC_HOST:$RSYNC_DEST/$v/
28    for arch in $ARCHS; do
29        for m in $PRIVATE_MEDIA; do
30            ssh -x $RSYNC_HOST perl -pi -e "'\$skip = 0 if 0; if (/^\[.*$m.*\]\$/) { \$skip = 1 } elsif (/^\[/) { \$skip = 0 }; undef \$_ if \$skip'" $RSYNC_DEST/$v/$arch/media/media_info/media.cfg
31            ssh -x $RSYNC_HOST perl -pi -e "'undef \$_ if /$m/'" $RSYNC_DEST/$v/$arch/media/media_info/hdlists
32        done
33    done
34done
Note: See TracBrowser for help on using the repository browser.