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:
72ff889
)
general improvements
author
Ian Kelling
<iank@fsf.org>
Mon, 18 Dec 2023 21:07:59 +0000
(16:07 -0500)
committer
Ian Kelling
<iank@fsf.org>
Mon, 18 Dec 2023 21:07:59 +0000
(16:07 -0500)
ex
patch
|
blob
|
history
diff --git
a/ex
b/ex
index 88470cc826233c9077f14c9349d9e1cd57be1a7a..9b82d786b8c8c3c477363f00d27bc90311847cc1 100755
(executable)
--- a/
ex
+++ b/
ex
@@
-33,7
+33,7
@@
Note: dtrx (package & command) extracts most of these plus some others."
shift
;;
esac
shift
;;
esac
- local x super restore_nullglob f
+ local x super restore_nullglob f
cmd
for x in "$@"; do
case "$x" in
# tars first, so they are higher pri than non-tar extensions
for x in "$@"; do
case "$x" in
# tars first, so they are higher pri than non-tar extensions
@@
-53,20
+53,33
@@
Note: dtrx (package & command) extracts most of these plus some others."
$quiet || echo tar Jxf "$x"
tar Jxf "$x"
;;
$quiet || echo tar Jxf "$x"
tar Jxf "$x"
;;
+ *.tar.zst )
+ $quiet || echo tar -I unzstd -xf "$x"
+ tar -I unzstd -xf "$x"
+ ;;
+ *.zst )
+ $quiet || echo unzstd "$x"
+ unzstd "$x"
+ ;;
*.xz)
$quiet || echo pixz -d "$x"
pixz -d "$x"
;;
*.7z )
*.xz)
$quiet || echo pixz -d "$x"
pixz -d "$x"
;;
*.7z )
- $quiet || echo 7za x "$x"
- 7za x "$x"
+ if type -p 7za &>/dev/null; then
+ cmd=7za
+ else
+ cmd=7zr
+ fi
+ $quiet || echo 7zr x "$x"
+ $cmd x "$x"
;;
*.bz2 )
$quiet || echo bunzip2 "$x"
bunzip2 "$x"
;;
*.deb )
;;
*.bz2 )
$quiet || echo bunzip2 "$x"
bunzip2 "$x"
;;
*.deb )
- $quiet || ar x "$x"
+ $quiet ||
echo
ar x "$x"
ar x "$x"
restore_nullglob=false
if ! shopt -q nullglob; then
ar x "$x"
restore_nullglob=false
if ! shopt -q nullglob; then
@@
-87,6
+100,11
@@
Note: dtrx (package & command) extracts most of these plus some others."
tar xJf $f
rm -f $f
;;
tar xJf $f
rm -f $f
;;
+ *.zst)
+ $quiet || echo tar -I unzstd -xf $f
+ tar -I unzstd -xf $f
+ rm -f $f
+ ;;
*.gz)
$quiet || echo tar xzf $f
tar xzf $f
*.gz)
$quiet || echo tar xzf $f
tar xzf $f