diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-07-20 13:59:27 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-07-20 13:59:27 -0400 |
commit | 986127e3db6858c461dae00f23c1fbaf9302d8cb (patch) | |
tree | d4f9c40d65965215f6058c6c0648456d9ae67c5f | |
parent | 8f6ce7fb090a674f18b72e89a2b868fe1343fe8f (diff) | |
download | postgresql-986127e3db6858c461dae00f23c1fbaf9302d8cb.tar.gz postgresql-986127e3db6858c461dae00f23c1fbaf9302d8cb.zip |
Avoid unportable shell syntax in pg_upgrade's test script.
Most of test.sh uses traditional backtick syntax for command substitution,
but commit da9b580d8 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
-rw-r--r-- | src/bin/pg_upgrade/test.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_upgrade/test.sh b/src/bin/pg_upgrade/test.sh index 45ccd8fa66a..775dd5729dd 100644 --- a/src/bin/pg_upgrade/test.sh +++ b/src/bin/pg_upgrade/test.sh @@ -234,7 +234,7 @@ pg_upgrade $PG_UPGRADE_OPTS -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B # Windows hosts don't support Unix-y permissions. case $testhost in MINGW*) ;; - *) if [ $(find ${PGDATA} -type f ! -perm 640 | wc -l) -ne 0 ]; then + *) if [ `find ${PGDATA} -type f ! -perm 640 | wc -l` -ne 0 ]; then echo "files in PGDATA with permission != 640"; exit 1; fi ;; @@ -242,7 +242,7 @@ esac case $testhost in MINGW*) ;; - *) if [ $(find ${PGDATA} -type d ! -perm 750 | wc -l) -ne 0 ]; then + *) if [ `find ${PGDATA} -type d ! -perm 750 | wc -l` -ne 0 ]; then echo "directories in PGDATA with permission != 750"; exit 1; fi ;; |