diff options
author | Dmitry Zhlobo <dima.zhlobo@gmail.com> | 2019-08-22 20:52:15 +0300 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-10-26 10:58:56 -0700 |
commit | e89e09e88f00ab989007e0c7fbaf157ed4cf0b18 (patch) | |
tree | 7a90ae37a072888749934dcdaad8ac2bb8c50050 | |
parent | fcbe5f1d92f8f9fdda3652088efb0e8393bcf925 (diff) | |
download | git-remote-gcrypt-e89e09e88f00ab989007e0c7fbaf157ed4cf0b18.tar.gz |
Use rst2man.py for man page generation when available
When docutils is installed on macos via pip or via homebrew there is no
`rst2man` binary but there is `rst2man.py` instead.
Signed-off-by: Dmitry Zhlobo <dima.zhlobo@gmail.com>
-rwxr-xr-x | install.sh | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -17,8 +17,16 @@ install_v git-remote-gcrypt "$DESTDIR$prefix/bin" 755 if command -v rst2man >/dev/null then + rst2man='rst2man' +elif command -v rst2man.py >/dev/null # it is installed as rst2man.py on macOS +then + rst2man='rst2man.py' +fi + +if [ -n "$rst2man" ] +then trap 'rm -f git-remote-gcrypt.1.gz' EXIT - verbose rst2man ./README.rst | gzip -9 > git-remote-gcrypt.1.gz + verbose $rst2man ./README.rst | gzip -9 > git-remote-gcrypt.1.gz install_v git-remote-gcrypt.1.gz "$DESTDIR$prefix/share/man/man1" 644 else echo "'rst2man' not found, man page not installed" >&2 |