check_bindir: avoid "test <cond> -a/-o <cond>"

The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elia Pinto committed Jun 6, 2014 at 07:55 UTC 4eaeb3264e1f86b99ba7732d9f69039a5805c435
1 file changed +1 -1
check_bindir
+1 -1
@@ -2,7 +2,7 @@
2 bindir="$1"
3 gitexecdir="$2"
4 gitcmd="$3"
5 -if test "$bindir" != "$gitexecdir" -a -x "$gitcmd"
5 +if test "$bindir" != "$gitexecdir" && test -x "$gitcmd"
6 then
7 echo
8 echo "!! You have installed git-* commands to new gitexecdir."