Wed, 16 Jun 2021 12:39:20 -0500
add autoinstall pg_format stub
912
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
1 | #!/bin/sh |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
2 | set -eu |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
3 | |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
4 | stubexec() { |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
5 | local real_bin="$(which -a $(basename $0) | grep -v $0 | head -n 1)" |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
6 | if [ -x "$real_bin" ]; then |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
7 | exec $real_bin $* |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
8 | fi |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
9 | } |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
10 | |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
11 | stubexec $* |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
12 | |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
13 | cpanm -n 'https://github.com/darold/pgFormatter.git' |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
14 | plenv rehash |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
15 | |
a409a606c665
add autoinstall pg_format stub
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
16 | stubexec $* |