aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xinstall.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/install.sh b/install.sh
index d84f31e..7fc1cfc 100755
--- a/install.sh
+++ b/install.sh
@@ -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