rpmextract: accept multiple input files

This commit is contained in:
Nikolay Amiantov 2014-10-22 16:13:26 +04:00
parent b31ac058cc
commit b580be236c
2 changed files with 6 additions and 6 deletions

View File

@ -3,9 +3,7 @@
stdenv.mkDerivation rec {
name = "rpmextract";
builder = builtins.toFile "builder.sh" ''
source $stdenv/setup
buildCommand = ''
install -Dm755 $script $out/bin/rpmextract
'';

View File

@ -1,8 +1,10 @@
#!/bin/sh
#!/bin/sh -e
if [ "$1" = "" ]; then
echo "usage: rpmextract package_name" 1>&2
echo "usage: rpmextract package_name..." 1>&2
exit 1
fi
@rpm@/bin/rpm2cpio "$1" | @cpio@/bin/cpio -idv
for i in "$@"; do
@rpm@/bin/rpm2cpio "$i" | @cpio@/bin/cpio -idv
done