preview-tui-ext: use atool for rpm/deb

atool does good job in previewing the content of deb/rpm files, use it.
This commit is contained in:
Roland Kammerer 2021-04-21 11:41:58 +02:00
parent cd070a6228
commit 5c1c732fb7

View file

@ -210,6 +210,8 @@ preview_file() {
fifo_pager unzip -l "$1" fifo_pager unzip -l "$1"
elif [ "$ext" = "gz" ] || [ "$ext" = "bz2" ]; then elif [ "$ext" = "gz" ] || [ "$ext" = "bz2" ]; then
fifo_pager tar -tvf "$1" fifo_pager tar -tvf "$1"
elif [ "$mimetype" = "application/x-rpm" ] || [ "$mimetype" = "application/vnd.debian.binary-package" ] && exists atool; then
fifo_pager atool -l "$1"
else else
fifo_pager print_bin_info "$1" fifo_pager print_bin_info "$1"
fi fi