Commit 8acb631b authored by Vitaly Lipatov's avatar Vitaly Lipatov

erc: implement list_formats without patool

parent 1f7203ea
...@@ -63,7 +63,12 @@ EOF ...@@ -63,7 +63,12 @@ EOF
list_formats() list_formats()
{ {
list_subformats list_subformats
a='' patool formats | grep ".* files:" | sed "s/ .*//g" if have_patool ; then
a='' patool formats | grep ".* files:" | sed "s/ .*//g"
else
echo "tar zip 7z tar.7z"
list_subformats
fi
# TODO: do not use patool formats in such case? # TODO: do not use patool formats in such case?
# See ArchiveCompressions in patool # See ArchiveCompressions in patool
list_extraformats list_extraformats
......
...@@ -78,6 +78,9 @@ extract_archive() ...@@ -78,6 +78,9 @@ extract_archive()
local type="$(get_archive_type "$arc")" local type="$(get_archive_type "$arc")"
case "$type" in case "$type" in
tar.*)
docmd $HAVE_7Z x -so $arc | docmd $HAVE_7Z x -si -ttar
;;
*) *)
docmd $HAVE_7Z x $arc "$@" docmd $HAVE_7Z x $arc "$@"
#fatal "Not yet supported extracting of $type archives" #fatal "Not yet supported extracting of $type archives"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment