From b580be236c4495f997f012235b5bd30478b77376 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Wed, 22 Oct 2014 16:13:26 +0400 Subject: [PATCH] rpmextract: accept multiple input files --- pkgs/tools/archivers/rpmextract/default.nix | 4 +--- pkgs/tools/archivers/rpmextract/rpmextract.sh | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/archivers/rpmextract/default.nix b/pkgs/tools/archivers/rpmextract/default.nix index bee5a71333a7..c5f982c955cc 100644 --- a/pkgs/tools/archivers/rpmextract/default.nix +++ b/pkgs/tools/archivers/rpmextract/default.nix @@ -3,9 +3,7 @@ stdenv.mkDerivation rec { name = "rpmextract"; - builder = builtins.toFile "builder.sh" '' - source $stdenv/setup - + buildCommand = '' install -Dm755 $script $out/bin/rpmextract ''; diff --git a/pkgs/tools/archivers/rpmextract/rpmextract.sh b/pkgs/tools/archivers/rpmextract/rpmextract.sh index b910a9926063..04f57f6e6045 100644 --- a/pkgs/tools/archivers/rpmextract/rpmextract.sh +++ b/pkgs/tools/archivers/rpmextract/rpmextract.sh @@ -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