Skip to content

Instantly share code, notes, and snippets.

@fernandoaleman
Created November 18, 2011 17:42
Show Gist options
  • Save fernandoaleman/1377169 to your computer and use it in GitHub Desktop.
Save fernandoaleman/1377169 to your computer and use it in GitHub Desktop.
Script to create rpm repository metadata
#!/bin/sh
# This is for Redhat 64 bit versions of Linux with `createrepo` installed. If you
# do not have createrepo, you can install it with:
# yum install -y createrepo
# Change DESTDIR path to RPMS directory of your repo
DESTDIR="/var/www/repo/rhel/6"
for ARCH in x86_64
do
pushd ${DESTDIR}/${ARCH} >/dev/null 2>&1
createrepo .
popd >/dev/null 2>&1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment