Change to bundled-flags arguments for compatibility

Older versions of tar don't understand the `-xf` flags while newer
versions understand the "bundled-flags" (as documend in bsdtar's
manpage) perfectly. So `tar xf` should maximize compatibility.
This commit is contained in:
toonn 2019-09-29 14:47:04 +02:00
parent 9f083c53e9
commit d28923968f

6
ghcup
View File

@ -1042,15 +1042,15 @@ unpack() {
( tar xf "${filename}" ) || die "unpacking failed!" ( tar xf "${filename}" ) || die "unpacking failed!"
else else
debug_message "xz -cd \"${filename}\" | tar -xf -" debug_message "xz -cd \"${filename}\" | tar -xf -"
( xz -cd "${filename}" | tar -xf - ; ) || die "unpacking failed!" ( xz -cd "${filename}" | tar xf - ; ) || die "unpacking failed!"
fi fi
;; ;;
gz) gz)
debug_message "gzip -cd \"${filename}\" | tar -xf -" debug_message "gzip -cd \"${filename}\" | tar -xf -"
( gzip -cd "${filename}" | tar -xf - ; ) || die "unpacking failed!" ( gzip -cd "${filename}" | tar xf - ; ) || die "unpacking failed!"
;; ;;
tar) tar)
edo tar -xf "${filename}" edo tar xf "${filename}"
;; ;;
*) *)
die "Unknown file extension: \"${file_ext}\"" die "Unknown file extension: \"${file_ext}\""