From f0fb727480e27b66697b300d4046e8148b5623aa Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 28 Jul 2019 20:08:17 -0400 Subject: [PATCH] better deb extraction --- ex | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ex b/ex index 0ef26c4..cf04ee6 100755 --- a/ex +++ b/ex @@ -38,10 +38,15 @@ Note: dtrx (package & command) extracts most of these plus some others." *.bz2 ) bunzip2 "$x" ;; *.deb ) ar x "$x" - tar Jxf data.tar.xz + tmp=(data.tar.*) + case $tmp in + *.xz) tar xJf data.tar.xz ;; + *.gz) tar xzf data.tar.gz ;; + *) echo "error: could not find data.tar.*" >&2; exit 1 ;; + esac tar xzf control.tar.gz rm -f control.tar.gz - rm -f data.tar.xz + rm -f data.tar.* ;; *.dsc) dpkg-source -x "$x" ;; *.gz ) gunzip "$x" ;; -- 2.30.2