summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNezmer <git@nezmer.info>2010-06-03 02:40:38 +0200
committerAllan McRae <allan@archlinux.org>2010-06-17 06:34:57 +0200
commit09aae4b7a5891ad738754a22f956c83911d1d9eb (patch)
treeb0d6bcda65060686faf17904244dbb7c30511f51 /scripts
parentc71fe7db42cd733e85965b11b887762cfd99a981 (diff)
downloadpacman-09aae4b7a5891ad738754a22f956c83911d1d9eb.tar.gz
pacman-09aae4b7a5891ad738754a22f956c83911d1d9eb.tar.xz
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 6763b6e0..678359f8 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -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