Generate the RPM package with [fpm](https://github.com/jordansissel/fpm) and upload it to the target.
```
echo /path/to/command >x.sh
fpm -n x -s dir -t rpm -a all --before-install .x.sh .
```
yumlocalinstall-yx-1.0-1.noarch.rpm
Evidence
Upstream reference
Environment
Local host
Compatibility
Linux reference. macOS compatibility has not been checked for this command and execution context.
The file on the remote host must have the `.rpm` extension, but the content does not have to be an RPM file. The file will be downloaded to a randomly created directory in `/var/tmp/yum-root-xxxxxx/`.