Last change
on this file since 2129 was
2129,
checked in by andersk, 13 years ago
|
scripts-createrepo: Use paranoid ssh options again
|
-
Property svn:executable set to
*
|
File size:
714 bytes
|
Rev | Line | |
---|
[2126] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | # Runs createrepo on the primary scripts server and copies the resulting |
---|
| 4 | # metadata to the live yum repository. |
---|
| 5 | |
---|
| 6 | set -eux |
---|
| 7 | |
---|
[2127] | 8 | ssh='ssh -o GSSAPIAuthentication=yes -o GSSAPIDelegateCredentials=no' |
---|
| 9 | |
---|
[2129] | 10 | yum=/afs/athena.mit.edu/contrib/scripts/yum-repos/rpm-fc$($ssh root@scripts.mit.edu 'lsb_release -rs') |
---|
[2128] | 11 | [ -d "$yum" ] |
---|
[2126] | 12 | |
---|
[2127] | 13 | tmp=$($ssh root@scripts.mit.edu "\ |
---|
[2126] | 14 | set -eux |
---|
| 15 | tmp=\$(mktemp -dt createrepo.XXXXXX) |
---|
| 16 | createrepo -d -o \"\$tmp\" -- '$yum' >&2 |
---|
| 17 | printf '%s' \"\$tmp\" |
---|
| 18 | ") |
---|
| 19 | [ "$tmp" ] |
---|
| 20 | |
---|
| 21 | new=$(mktemp -d -- "$yum/repodata.XXXXXX") |
---|
[2127] | 22 | rsync -avz -e "$ssh" -- "root@scripts.mit.edu:$tmp/repodata/" "$new" |
---|
[2126] | 23 | mv -b -T -- "$new" "$yum/repodata" |
---|
| 24 | rm -rf -- "$yum/repodata~" |
---|
| 25 | |
---|
[2127] | 26 | $ssh root@scripts.mit.edu "\ |
---|
[2126] | 27 | set -eux |
---|
| 28 | rm -rf -- '$tmp' |
---|
| 29 | " |
---|
Note: See
TracBrowser
for help on using the repository browser.