Last change
on this file since 2201 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
|
Line | |
---|
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 | |
---|
8 | ssh='ssh -o GSSAPIAuthentication=yes -o GSSAPIDelegateCredentials=no' |
---|
9 | |
---|
10 | yum=/afs/athena.mit.edu/contrib/scripts/yum-repos/rpm-fc$($ssh root@scripts.mit.edu 'lsb_release -rs') |
---|
11 | [ -d "$yum" ] |
---|
12 | |
---|
13 | tmp=$($ssh root@scripts.mit.edu "\ |
---|
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") |
---|
22 | rsync -avz -e "$ssh" -- "root@scripts.mit.edu:$tmp/repodata/" "$new" |
---|
23 | mv -b -T -- "$new" "$yum/repodata" |
---|
24 | rm -rf -- "$yum/repodata~" |
---|
25 | |
---|
26 | $ssh root@scripts.mit.edu "\ |
---|
27 | set -eux |
---|
28 | rm -rf -- '$tmp' |
---|
29 | " |
---|
Note: See
TracBrowser
for help on using the repository browser.