makepkg: Extract from any file bsdtar can recognize

If "file -bizL" does not return a supported type, check if the file is
recognized by bsdtar and if yes extract from it.

Dan: use '-q' option to prevent needing to seek the entire archive.

Signed-off-by: Nezmer <git@nezmer.info>
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Nezmer 2010-06-02 19:40:38 -05:00 committed by Allan McRae
parent c71fe7db42
commit 09aae4b7a5

View file

@ -682,9 +682,12 @@ extract_sources() {
*) continue;; *) continue;;
esac ;; esac ;;
*) *)
# Don't know what to use to extract this file, # See if bsdtar can recognize the file
# skip to the next file if bsdtar -tf "$file" -q '*' &>/dev/null; then
continue;; cmd="bsdtar"
else
continue
fi ;;
esac esac
local ret=0 local ret=0