summaryrefslogtreecommitdiffstats
path: root/extract-rpm.sh
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-01-06 22:55:06 -0800
committerRoland McGrath <roland@redhat.com>2009-01-06 22:55:06 -0800
commit2e943a5f18eaf1889eba98c16fdc3df118e4e83f (patch)
treede42b0f9632502103332fffeee521011afaa17e4 /extract-rpm.sh
parent487b56811b3a67b25bc13a9114378e87e0fb5c1a (diff)
downloaddebuginfo-test-scripts-2e943a5f18eaf1889eba98c16fdc3df118e4e83f.tar.gz
debuginfo-test-scripts-2e943a5f18eaf1889eba98c16fdc3df118e4e83f.tar.xz
debuginfo-test-scripts-2e943a5f18eaf1889eba98c16fdc3df118e4e83f.zip
now for all the peanuts
Diffstat (limited to 'extract-rpm.sh')
-rwxr-xr-xextract-rpm.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/extract-rpm.sh b/extract-rpm.sh
index 9ed5253..44b1014 100755
--- a/extract-rpm.sh
+++ b/extract-rpm.sh
@@ -19,14 +19,15 @@ while read file; do
archless=${rpm%.*}
arch=${rpm##*.}
- d=${arch}/${archless:0:2}/${archless:2:2}/$rpm
+ d=${arch}/${archless:0:2}/${archless:2:2}
+ d="$dest/$d"
if [ -d "$d/$rpm" ] && ! rmdir "$d/$rpm" 2> /dev/null; then
[ $v -eq 0 ] || echo >&2 "$rpm already there"
continue
fi
mkdir -p "$d/$rpm" || exit
- rpm2cpio "$rpm" |
+ rpm2cpio "$file" |
(cd "$d/$rpm"; cpio --quiet --extract --no-abs --make-dir ||
echo >&2 "FAILED: $rpm")