Changeset 2552


Ignore:
Timestamp:
Aug 1, 2014, 11:51:07 PM (10 years ago)
Author:
andersk
Message:
scripts-createrepo: Accept a server argument
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/fc20-dev/locker/sbin/scripts-createrepo

    r2129 r2552  
    66set -eux
    77
     8server="${1-scripts.mit.edu}"
     9
    810ssh='ssh -o GSSAPIAuthentication=yes -o GSSAPIDelegateCredentials=no'
    911
    10 yum=/afs/athena.mit.edu/contrib/scripts/yum-repos/rpm-fc$($ssh root@scripts.mit.edu 'lsb_release -rs')
     12yum=/afs/athena.mit.edu/contrib/scripts/yum-repos/rpm-fc$($ssh "root@$server" 'lsb_release -rs')
    1113[ -d "$yum" ]
    1214
    13 tmp=$($ssh root@scripts.mit.edu "\
     15tmp=$($ssh "root@$server" "\
    1416set -eux
    1517tmp=\$(mktemp -dt createrepo.XXXXXX)
     
    2022
    2123new=$(mktemp -d -- "$yum/repodata.XXXXXX")
    22 rsync -avz -e "$ssh" -- "root@scripts.mit.edu:$tmp/repodata/" "$new"
     24rsync -avz -e "$ssh" -- "root@$server:$tmp/repodata/" "$new"
    2325mv -b -T -- "$new" "$yum/repodata"
    2426rm -rf -- "$yum/repodata~"
    2527
    26 $ssh root@scripts.mit.edu "\
     28$ssh "root@$server" "\
    2729set -eux
    2830rm -rf -- '$tmp'
Note: See TracChangeset for help on using the changeset viewer.