How to: download entire repositories and check for updates daily CentOS/RHEL/Fedora

For those of you who deploy many systems running on Linux, especially the CentOS/RHEL/Fedora variety, you may want to speed up the process. Especially when it comes to installing packages and updates without having to wait for your internet connection. Luckily, you can download an entire repository and serve it straight from the server. Here’s how you can do so by using a bash script.