David Aguilar <dav...@gmail.com> writes:

> +     for directory in $(env | grep -Ei '^PROGRAM(FILES(\(X86\))?|W6432)=' |
> +             cut -d '=' -f 2- | sort -u)

Is the final "sort" really desired?  I am wondering if there are
fixed precedence/preference order among variants of %PROGRAMFILES% 
environment variables that the users on the platform are expected
to stick to, but the "sort" is sorting by the absolute pathnames of
where these things are, which may not reflect that order.

Not that I personally care too deeply, as I would expect that it is
likely any one of them found would just work fine ;-)

> +     do
> +             if test -n "$directory" && test -x "$directory/$winmerge_exe"
> +             then
> +                     printf '%s' "$directory/$winmerge_exe"
> +                     return
> +             fi
> +     done
> +
> +     printf WinMergeU.exe
> +}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to