forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0426932
committed
Further portability hacking in pg_upgrade's test script.
I blew the dust off a Bourne shell (file date 1996, yea verily) andtried to run test.sh with it. It mostly worked, but I found that thetemp-directory creation code introduced by commitbe76a6d was notcompatible, for a couple of reasons: this shell thinks "set -e" shouldforce an exit if a command within backticks fails, and it also thinks codewithin braces should be executed by a sub-shell, meaning that variablesettings don't propagate back up to the parent shell. In view of VictorWagner's report that Solaris is still using pre-POSIX shells, seems likewe oughta make this case work. It's not like the code is any lessidiomatic this way; the prior coding technique appeared nowhere else.(There is a remaining bash-ism here, which is that $RANDOM doesn't dowhat the code hopes in non-bash shells. But the use of $$ elsewhere inthat path should be enough to ensure uniqueness and some amount ofrandomness, so I think it's okay as-is.)Back-patch to all supported branches, as the previous commit was.Discussion:https://postgr.es/m/20180720153820.69e9ae6c@fafnir.local.vm1 parent0c0908d commit0426932
1 file changed
+10
-12
lines changedLines changed: 10 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 |
| - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
53 | 51 |
| |
54 | 52 |
| |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
61 | 59 |
| |
62 | 60 |
| |
63 | 61 |
| |
|
0 commit comments
Comments
(0)