Skip to content

Instantly share code, notes, and snippets.

@miku
Forked from fernandoaleman/create-repo-metadata.sh
Created January 31, 2014 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miku/8730209 to your computer and use it in GitHub Desktop.
Save miku/8730209 to your computer and use it in GitHub Desktop.
#!/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