Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nixjobin/fceb418743d3cff50e4e99acc330379d to your computer and use it in GitHub Desktop.
Save nixjobin/fceb418743d3cff50e4e99acc330379d 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