Created
October 2, 2013 16:25
-
-
Save awood/6796396 to your computer and use it in GitHub Desktop.
A simple shell script to grab Java spec files so you can examine and learn from them. It looks in source repositories for items with a BuildRequires on jpackage-utils. Then it grabs the location for that SRPM, downloads it, and extracts the spec file. This script is probably Fedora specific.
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 | |
packages=$(repoquery --qf "%{name}" --archlist=src --enablerepo='*-source' --whatrequires jpackage-utils | sort | uniq) | |
for p in $packages; do | |
srpm_location=$(repoquery --qf "%{location}" --archlist=src --enablerepo='*-source' $p) | |
srpm=$(curl -s -O -w '%{filename_effective}' $srpm_location) | |
rpm2cpio $srpm | cpio --quiet -id ${p}.spec | |
rm $srpm | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment