mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
makepkg file-type detection changes from James Rosten <seinfeld90@gmail.com>
and Johannes Weiner <hannes@saeurebad.de> This should fix FS#6246
This commit is contained in:
parent
35a9f3e7d0
commit
7ed7977e63
@ -681,24 +681,20 @@ else
|
|||||||
for netfile in "${source[@]}"; do
|
for netfile in "${source[@]}"; do
|
||||||
unziphack=0
|
unziphack=0
|
||||||
file=$(strip_url "$netfile")
|
file=$(strip_url "$netfile")
|
||||||
|
# fix flyspray #6246
|
||||||
|
file_type=$(file -biz "$file")
|
||||||
unset cmd
|
unset cmd
|
||||||
case "$(echo $file |tr "A-Z" "a-z")" in
|
case "$file_type" in
|
||||||
*.tar.gz|*.tar.z|*.tgz)
|
*application/x-tar*)
|
||||||
cmd="tar --use-compress-program=gzip -xf $file" ;;
|
|
||||||
*.tar.bz2|*.tbz2)
|
|
||||||
cmd="tar --use-compress-program=bzip2 -xf $file" ;;
|
|
||||||
*.tar)
|
|
||||||
cmd="tar -xf $file" ;;
|
cmd="tar -xf $file" ;;
|
||||||
*.zip)
|
*application/x-zip*)
|
||||||
unziphack=1
|
unziphack=1
|
||||||
cmd="unzip -qqo $file" ;;
|
cmd="unzip -qqo $file" ;;
|
||||||
*.cpio.gz)
|
*application/x-cpio*)
|
||||||
cmd="bsdtar -x -f $file" ;;
|
cmd="bsdtar -x -f $file" ;;
|
||||||
*.cpio.bz2)
|
*application/x-gzip*)
|
||||||
cmd="bsdtar -x -f $file" ;;
|
|
||||||
*.gz)
|
|
||||||
cmd="gunzip -f $file" ;;
|
cmd="gunzip -f $file" ;;
|
||||||
*.bz2)
|
*application/x-bzip*)
|
||||||
cmd="bunzip2 -f $file" ;;
|
cmd="bunzip2 -f $file" ;;
|
||||||
esac
|
esac
|
||||||
if [ "$cmd" != "" ]; then
|
if [ "$cmd" != "" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user