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