0
0
mirror of https://github.com/tj/n.git synced 2024-11-25 07:39:21 +01:00

Fix typo and improve comment

Co-authored-by:  DeeDeeG <DeeDeeG@users.noreply.github.com>
This commit is contained in:
John Gee 2020-01-29 21:47:54 +13:00
parent 6d642bc6e8
commit aef717d3ab

4
bin/n
View File

@ -816,10 +816,10 @@ function can_use_xz() {
# For research, see https://github.com/shadowspawn/nvh/issues/8 # For research, see https://github.com/shadowspawn/nvh/issues/8
local uname_s="$(uname -s)" local uname_s="$(uname -s)"
if [[ "${uname_s}" = "Linux" ]] && command -v xz &> /dev/null ; then if [[ "${uname_s}" = "Linux" ]] && command -v xz &> /dev/null ; then
# tar on linux is likely to support xv if it is available separately # tar on linux is likely to support xz if it is available as a command
return 0 return 0
elif [[ "${uname_s}" = "Darwin" && "$(sw_vers -productVersion | cut -d '.' -f 2)" -gt "8" ]]; then elif [[ "${uname_s}" = "Darwin" && "$(sw_vers -productVersion | cut -d '.' -f 2)" -gt "8" ]]; then
# tar on recent Darwin has xv support built-in # tar on recent Darwin has xz support built-in
return 0 return 0
fi fi
return 2 # not supported return 2 # not supported