Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ sysconfdir ?= /etc

export PYTHON ?= python3
RST2MAN ?= rst2man
SED ?= sed

version ?= $(shell git describe --dirty 2> /dev/null | cut -b2-)
version := $(if $(version),$(version),devel)
Expand All @@ -26,7 +27,7 @@ deb: $(install-deps)
man: git-hub.1

git-hub.1: man.rst git-hub
sed 's/^:Version: devel$$/:Version: $(version)/' $< | \
$(SED) 's/^:Version: devel$$/:Version: $(version)/' $< | \
$(RST2MAN) --exit-status=1 > $@ || ($(RM) $@ && false)

bash-completion: generate-bash-completion git-hub
Expand All @@ -35,9 +36,9 @@ bash-completion: generate-bash-completion git-hub
.PHONY: install
install: $(install-deps)
install -m 755 -D git-hub $(DESTDIR)$(prefix)/bin/git-hub
sed -i 's/^VERSION = "git-hub devel"$$/VERSION = "git-hub $(version)"/' \
$(SED) -i 's/^VERSION = "git-hub devel"$$/VERSION = "git-hub $(version)"/' \
$(DESTDIR)$(prefix)/bin/git-hub
sed -i 's|^#!/usr/bin/env python3$$|#!/usr/bin/env $(PYTHON)|' \
$(SED) -i 's|^#!/usr/bin/env python3$$|#!/usr/bin/env $(PYTHON)|' \
$(DESTDIR)$(prefix)/bin/git-hub
install -m 644 -D git-hub.1 $(DESTDIR)$(prefix)/share/man/man1/git-hub.1
install -m 644 -D ftdetect.vim \
Expand Down
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ activate the *ftdetect* plugin by copying or symbolic-linking it to
# or if you are copying from the sources:
# ln -s ftdetect.vim ~/.vim/ftdetect/githubmsg.vim

On macOS set environment variable ``SED`` to ``gsed``. ``gsed`` can be installed
with ``sudo port install gsed`` from MacPorts.


Similar Projects
================
Expand Down
Loading