From 59065b269c86747ece904b4d7a4bd9f494476978 Mon Sep 17 00:00:00 2001
From: Tristan Partin <tristan@neon.tech>
Date: Tue, 12 Dec 2023 10:21:12 -0600
Subject: [PATCH v1 2/6] Remove use of test -o in find_typedef

This has been deprecated for a while. Rationale from POSIX:

> The XSI extensions specifying the -a and -o binary primaries and the '('
> and ')' operators have been marked obsolescent. (Many expressions using
> them are ambiguously defined by the grammar depending on the specific
> expressions being evaluated.) Scripts using these expressions should be
> converted to the forms given below. Even though many implementations
> will continue to support these obsolescent forms, scripts should be
> extremely careful when dealing with user-supplied input that could be
> confused with these and other primaries and operators. Unless the
> application developer knows all the cases that produce input to the
> script, invocations like:
>
>     test "$1" -a "$2"
>
> should be written as:
>
>     test "$1" && test "$2"
---
 src/tools/find_typedef | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/find_typedef b/src/tools/find_typedef
index fec0520c32..ac798a90c1 100755
--- a/src/tools/find_typedef
+++ b/src/tools/find_typedef
@@ -26,7 +26,7 @@
 #    http://www.informatik.uni-frankfurt.de/doc/texi/stabs_toc.html
 
 
-if [ "$#" -eq 0 -o ! -d "$1" ]
+if [ "$#" -eq 0 ] || [ ! -d "$1" ]
 then	echo "Usage:  $0 postgres_binary_directory [...]" 1>&2
 	exit 1
 fi
-- 
Tristan Partin
Neon (https://neon.tech)

