iankelling.org
/
git
/
small-misc-bash
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7494ae4
)
better deb extraction
author
Ian Kelling
<iank@fsf.org>
Mon, 29 Jul 2019 00:08:17 +0000
(20:08 -0400)
committer
Ian Kelling
<iank@fsf.org>
Mon, 29 Jul 2019 00:08:17 +0000
(20:08 -0400)
ex
patch
|
blob
|
history
diff --git
a/ex
b/ex
index 0ef26c45c5a9d7dc50d6852986bb7091f7e60d59..cf04ee6f2f26e93d3ac5ec30b5030a39e7b55611 100755
(executable)
--- 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" ;;