rpmextract: accept multiple input files
This commit is contained in:
parent
b31ac058cc
commit
b580be236c
|
@ -3,9 +3,7 @@
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "rpmextract";
|
name = "rpmextract";
|
||||||
|
|
||||||
builder = builtins.toFile "builder.sh" ''
|
buildCommand = ''
|
||||||
source $stdenv/setup
|
|
||||||
|
|
||||||
install -Dm755 $script $out/bin/rpmextract
|
install -Dm755 $script $out/bin/rpmextract
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
if [ "$1" = "" ]; then
|
||||||
echo "usage: rpmextract package_name" 1>&2
|
echo "usage: rpmextract package_name..." 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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