blob: ff014bce28778149c8bfd9ae2b5a7efcab58e972 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
# NB! needs bsdtar/libarchive v2.8+
PATH=/bin:/usr/bin
if [ $# -eq 0 -a ! -t 0 ]; then
f=/dev/stdin
elif [ $# -eq 1 ]; then
f=$1
else
echo Usage: rpm2cpio [file.rpm]
echo dumps the contents to stdout as a GNU cpio archive
exit 0
fi
bsdtar cf - --format=newc @- < ${f}
|