rpmextract: accept multiple input files
This commit is contained in:
parent
b31ac058cc
commit
b580be236c
@ -3,9 +3,7 @@
|
||||
stdenv.mkDerivation rec {
|
||||
name = "rpmextract";
|
||||
|
||||
builder = builtins.toFile "builder.sh" ''
|
||||
source $stdenv/setup
|
||||
|
||||
buildCommand = ''
|
||||
install -Dm755 $script $out/bin/rpmextract
|
||||
'';
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user