Merge remote-tracking branch 'origin/merge-requests/119'

This commit is contained in:
Julian Ospald 2019-10-03 16:36:36 +08:00
commit db9463a795
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

10
ghcup
View File

@ -1038,19 +1038,19 @@ unpack() {
case "${file_ext}" in
xz)
if test "${mydistro}" = "darwin"; then
debug_message "tar -xzf \"${filename}\""
( tar -xzf "${filename}" ) || die "unpacking failed!"
debug_message "tar xf \"${filename}\""
( tar xf "${filename}" ) || die "unpacking failed!"
else
debug_message "xz -cd \"${filename}\" | tar -xf -"
( xz -cd "${filename}" | tar -xf - ; ) || die "unpacking failed!"
( xz -cd "${filename}" | tar xf - ; ) || die "unpacking failed!"
fi
;;
gz)
debug_message "gzip -cd \"${filename}\" | tar -xf -"
( gzip -cd "${filename}" | tar -xf - ; ) || die "unpacking failed!"
( gzip -cd "${filename}" | tar xf - ; ) || die "unpacking failed!"
;;
tar)
edo tar -xf "${filename}"
edo tar xf "${filename}"
;;
*)
die "Unknown file extension: \"${file_ext}\""