Skip to content

Instantly share code, notes, and snippets.

@shaposhnikoff
Forked from ivoarch/create_rpmrepo.sh
Created May 14, 2023 12:15
Show Gist options
  • Save shaposhnikoff/e51e1f9d338680dd8e493ba389d0e5d1 to your computer and use it in GitHub Desktop.
Save shaposhnikoff/e51e1f9d338680dd8e493ba389d0e5d1 to your computer and use it in GitHub Desktop.
Create RPM Repository for Rhel/CentOS
#!/bin/bash
# Create RPM Repository for Rhel/CentOS
ftpdir="$HOME/Dropbox/Public/rpmrepo"
releases=(el6 el7)
for release in "${releases[@]}"; do
for dir in i386 x86_64 SRPMS; do
pushd "${ftpdir}/${release}/${dir}" >/dev/null 2>&1
createrepo -v .
repoview .
popd >/dev/null 2>&1
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment