1 2 3 4 5 6 7 8
#!/bin/sh rm -rf UNPACKED mkdir -p UNPACKED for rpm in *.rpm; do rpm2cpio "$rpm" | ( cd UNPACKED && cpio -i --make-directories) done