1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

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;;
esac ;;
*)
# Don't know what to use to extract this file,
# skip to the next file
continue;;
# See if bsdtar can recognize the file
if bsdtar -tf "$file" -q '*' &>/dev/null; then
cmd="bsdtar"
else
continue
fi ;;
esac
local ret=0