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

This commit is contained in:
Julian Ospald 2019-07-29 10:42:56 +08:00
commit ad91509d28
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
1 changed files with 8 additions and 1 deletions

9
ghcup
View File

@ -590,13 +590,20 @@ command_exists() {
check_required_commands() {
_missing_commands=
for com in "$@" awk uname basename tar xz gzip mktemp dirname ; do
for com in "$@" awk uname basename tar gzip mktemp dirname ; do
command_exists "${com}" || {
_missing_commands="${_missing_commands} ${com}"
}
done
unset com
# darwin uses tar's built-in xz decompression
if test "${mydistro}" != "darwin"; then
command_exists xz || {
_missing_commands="${_missing_commands} xz"
}
fi
if [ -n "${_missing_commands}" ] ; then
printf "%s" "${_missing_commands}"
unset _missing_commands