[pacman-dev] [PATCH 1/2] makepkg: simplify extraction command selection
Cedric Staniewski
cedric at gmx.ca
Wed Aug 5 06:56:27 EDT 2009
Signed-off-by: Cedric Staniewski <cedric at gmx.ca>
---
scripts/makepkg.sh.in | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 56ad2c0..9141e1c 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -640,16 +640,16 @@ extract_sources() {
fi
# fix flyspray #6246
- local file_type=$(file -bizL "$file")
+ local file_type=$(file -bz --mime-type "$file")
local cmd=''
case "$file_type" in
- *application/x-tar*|*application/zip*|*application/x-zip*|*application/x-cpio*)
+ application/x-tar|application/zip|application/x-zip|application/x-cpio)
cmd="bsdtar -x -f" ;;
- *application/x-gzip*)
+ application/x-gzip)
cmd="gunzip -d -f" ;;
- *application/x-bzip*)
+ application/x-bzip)
cmd="bunzip2 -f" ;;
- *application/x-xz*)
+ application/x-xz)
cmd="xz -d -f" ;;
*)
# Don't know what to use to extract this file,
--
1.6.4
More information about the pacman-dev
mailing list