diff options
author | TBK <tbk@jjtc.eu> | 2019-05-23 14:09:13 +0200 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-06-06 22:34:07 -0300 |
commit | c37d2c86e230893561e45445b6e37f5f7879b6b6 (patch) | |
tree | 02fac2ff2e4ec1f2031971651887d5ee9fdd6158 /community/rpm2cpio/rpm2cpio.sh | |
parent | 0df3c472ed7adcb8c9fbf5792e8e1ba1f09a96e5 (diff) | |
download | aports-c37d2c86e230893561e45445b6e37f5f7879b6b6.tar.bz2 aports-c37d2c86e230893561e45445b6e37f5f7879b6b6.tar.xz |
community/rpm2cpio: move from testing
Diffstat (limited to 'community/rpm2cpio/rpm2cpio.sh')
-rw-r--r-- | community/rpm2cpio/rpm2cpio.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/community/rpm2cpio/rpm2cpio.sh b/community/rpm2cpio/rpm2cpio.sh new file mode 100644 index 0000000000..ff014bce28 --- /dev/null +++ b/community/rpm2cpio/rpm2cpio.sh @@ -0,0 +1,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}
\ No newline at end of file |