I want to install some packages (.rpm files) on a RedHat system with no internet access. So, I'd have to download the packages on another system and copy them to the target system. But I do not have another RedHat system; all I have is my MacBook. And, to make matters worse, the internet access I have on my MacBook is from tethering my phone's 3G internet connection, where my network provider caps the tethered internet speed to 384 kBps. So, I cannot download a RedHat ISO of 1.5 GB to install as a virtual machine, as it would take hours. So, it'd be much more productive to be able to download the required RPM files on my Mac, as they typically are some kB in size, and I can't see the total size of all the required RPM dependency files exceeding, say, 100 MB.
So, how do I do the Mac equivalent of the Fedora-based-Linux code below:
sudo yum install \ --installroot=</path/to/tmp_dir> \ --downloadonly --downloaddir <rpm_dir> <package>
in order to download all the requisite RPM packages along with their dependencies in a Mac?