Created
November 24, 2011 11:41
-
-
Save larstobi/1391163 to your computer and use it in GitHub Desktop.
Update repodata for Yum repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Directory layout: | |
| # 5Server/noarch | |
| # 5Server/x86_64 | |
| # 6Server/noarch | |
| # 6Server/x86_64 | |
| # Place the RPM packages in their respective arch folder, and run this script. | |
| # | |
| ROOT_DIR=`pwd` | |
| for dist in 5Server 6Server; do | |
| if [ -d $ROOT_DIR/$dist ]; then | |
| cd $ROOT_DIR/$dist | |
| for arch in noarch i386 x86_64 ; do | |
| if [ -d $arch ]; then | |
| rm -rf $arch/repodata | |
| createrepo -s sha $arch | |
| fi | |
| done | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment