Last change
on this file since 2127 was
2127,
checked in by andersk, 13 years ago
|
scripts-createrepo: Use paranoid ssh options
|
-
Property svn:executable set to
*
|
File size:
656 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 | |
---|
[2126] | 10 | yum=/afs/athena.mit.edu/contrib/scripts/yum-repos/rpm-fc15 |
---|
| 11 | |
---|
[2127] | 12 | tmp=$($ssh root@scripts.mit.edu "\ |
---|
[2126] | 13 | set -eux |
---|
| 14 | tmp=\$(mktemp -dt createrepo.XXXXXX) |
---|
| 15 | createrepo -d -o \"\$tmp\" -- '$yum' >&2 |
---|
| 16 | printf '%s' \"\$tmp\" |
---|
| 17 | ") |
---|
| 18 | [ "$tmp" ] |
---|
| 19 | |
---|
| 20 | new=$(mktemp -d -- "$yum/repodata.XXXXXX") |
---|
[2127] | 21 | rsync -avz -e "$ssh" -- "root@scripts.mit.edu:$tmp/repodata/" "$new" |
---|
[2126] | 22 | mv -b -T -- "$new" "$yum/repodata" |
---|
| 23 | rm -rf -- "$yum/repodata~" |
---|
| 24 | |
---|
[2127] | 25 | $ssh root@scripts.mit.edu "\ |
---|
[2126] | 26 | set -eux |
---|
| 27 | rm -rf -- '$tmp' |
---|
| 28 | " |
---|
Note: See
TracBrowser
for help on using the repository browser.