Skip to content

Instantly share code, notes, and snippets.

@larstobi
Created November 24, 2011 11:41
Show Gist options
  • Select an option

  • Save larstobi/1391163 to your computer and use it in GitHub Desktop.

Select an option

Save larstobi/1391163 to your computer and use it in GitHub Desktop.
Update repodata for Yum repo
#!/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