diff options
author | root <root@localhost> | 2013-02-14 00:00:00 +0000 |
---|---|---|
committer | root <root@localhost> | 2013-02-14 00:00:00 +0000 |
commit | 3a7f96671ef87c2a8d9bf8aadcabf3e4b76a6229 (patch) | |
tree | 7b58b1ada4420880b6b955158772bab0020afd53 /install.sh | |
parent | f1614d70ec93de80b87232d33ef3cb26f4432eeb (diff) | |
download | git-remote-gcrypt-3a7f96671ef87c2a8d9bf8aadcabf3e4b76a6229.tar.gz |
Add ./install.sh to install git-remote-gcrypt and its man page
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..d84f31e --- /dev/null +++ b/install.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e + +: ${prefix:=/usr/local} +: ${DESTDIR:=} + +verbose() { echo "$@" >&2 && "$@"; } +install_v() +{ + # Install $1 into $2/ with mode $3 + verbose install -d "$2" && + verbose install -m "$3" "$1" "$2" +} + +install_v git-remote-gcrypt "$DESTDIR$prefix/bin" 755 + +if command -v rst2man >/dev/null +then + trap 'rm -f git-remote-gcrypt.1.gz' EXIT + 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 +fi |