Skip to content

Commit 986127e

Browse files
committed
Avoid unportable shell syntax in pg_upgrade's test script.
Most of test.sh uses traditional backtick syntax for command substitution, but commit da9b580 introduced two uses of $(...) syntax, which is not recognized by very old shells. Bring those into line with the rest. Victor Wagner Discussion: https://postgr.es/m/20180720153820.69e9ae6c@fafnir.local.vm
1 parent 8f6ce7f commit 986127e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_upgrade/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,15 @@ pg_upgrade $PG_UPGRADE_OPTS -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B
234234
# Windows hosts don't support Unix-y permissions.
235235
case $testhost in
236236
MINGW*) ;;
237-
*) if [ $(find ${PGDATA} -type f ! -perm 640 | wc -l) -ne 0 ]; then
237+
*) if [ `find ${PGDATA} -type f ! -perm 640 | wc -l` -ne 0 ]; then
238238
echo "files in PGDATA with permission != 640";
239239
exit 1;
240240
fi ;;
241241
esac
242242

243243
case $testhost in
244244
MINGW*) ;;
245-
*) if [ $(find ${PGDATA} -type d ! -perm 750 | wc -l) -ne 0 ]; then
245+
*) if [ `find ${PGDATA} -type d ! -perm 750 | wc -l` -ne 0 ]; then
246246
echo "directories in PGDATA with permission != 750";
247247
exit 1;
248248
fi ;;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy