| Last change
                  on this file since 2127 was
                  2127,
                  checked in by andersk, 14 years ago | 
        
          | scripts-createrepo: Use paranoid ssh options | 
        
          | 
              
                  Property svn:executable set to
                  * | 
        | File size:
            656 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-fc15 | 
|---|
| 11 |  | 
|---|
| 12 | tmp=$($ssh root@scripts.mit.edu "\ | 
|---|
| 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") | 
|---|
| 21 | rsync -avz -e "$ssh" -- "root@scripts.mit.edu:$tmp/repodata/" "$new" | 
|---|
| 22 | mv -b -T -- "$new" "$yum/repodata" | 
|---|
| 23 | rm -rf -- "$yum/repodata~" | 
|---|
| 24 |  | 
|---|
| 25 | $ssh root@scripts.mit.edu "\ | 
|---|
| 26 | set -eux | 
|---|
| 27 | rm -rf -- '$tmp' | 
|---|
| 28 | " | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.