Created
October 31, 2015 17:00
-
-
Save virtuald/6b86f1c09cf06cf542e3 to your computer and use it in GitHub Desktop.
Download and unpack source RPM in one command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
PKG="$1" | |
SRPM=$(dnf download --source -v $PKG | tee /dev/stderr | grep -o '.*--> Package \:.*\:.*\.src\.rpm$' | rev | cut -f 1 -d' ' | rev | uniq) | |
rpm2cpio $SRPM | cpio -idmv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment