Skip to content

Commit

Permalink
use "standard" posix directory variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Evans authored and Bill Evans committed Feb 5, 2020
1 parent 31bc5ab commit 9bf9a7f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
PREFIX ?= /usr/local
BINPREFIX ?= "$(PREFIX)/bin"
LIBPREFIX ?= "$(PREFIX)/lib"
MANPREFIX ?= "$(PREFIX)/share/man/man1"
SYSCONFDIR ?= $(PREFIX)/etc
prefix := /usr/local
exec_prefix := $(prefix)
bindir := $(exec_prefix)/bin
libexecdir := $(exec_prefix)/libexec
sysconfdir := $(prefix)/etc
datarootdir := $(prefix)/share
mandir := $(datarootdir)/man
man1dir := $(mandir)/man1

default: install

install:
@mkdir -p $(DESTDIR)$(MANPREFIX)
@mkdir -p $(DESTDIR)$(BINPREFIX)
@mkdir -p $(DESTDIR)$(LIBPREFIX)/git-issue
install git-issue.sh $(DESTDIR)$(BINPREFIX)/git-issue
install lib/git-issue/import-export.sh $(DESTDIR)$(LIBPREFIX)/git-issue/import-export.sh
install -m 644 git-issue.1 $(DESTDIR)$(MANPREFIX)/
@mkdir -p $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
install -m 644 gi-completion.sh $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/git-issue
mkdir -p "$(bindir)" "$(libexecdir)/git-issue" "$(sysconfdir)/bash_completion.d" "$(man1dir)"
install git-issue.sh $(bindir)/git-issue
install lib/git-issue/import-export.sh $(libexecdir)/git-issue/import-export.sh
install -m 644 git-issue.1 $(man1dir)/
install -m 644 gi-completion.sh $(sysconfdir)/bash_completion.d/git-issue

# Synchronize man page and usage with the contents of the README file
sync-docs:
Expand All @@ -29,9 +29,9 @@ test:
./test.sh

uninstall:
rm -f $(DESTDIR)$(BINPREFIX)/git-issue
rm -f $(DESTDIR)$(MANPREFIX)/git-issue.
rm -f $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/git-issue
rm -f $(bindir)/git-issue
rm -f $(man1dir)/git-issue.
rm -f $(sysconfdir)/bash_completion.d/git-issue

clean:

Expand Down
2 changes: 1 addition & 1 deletion git-issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ IFS=:
# Set library path
# shellcheck disable=SC2086
# Rationale: Word splitting not an issue
LIB_PATH="$(dirname $0)/../lib:$LD_LIBRARY_PATH:/usr/local/lib:/usr/lib"
LIB_PATH="$(dirname $0)/../libexec:$LD_LIBRARY_PATH:/usr/local/libexec:/usr/libexec"
if [ "x$GIT_ISSUE_LIB_PATH" != x ] ; then
LIB_PATH="$GIT_ISSUE_LIB_PATH"
fi
Expand Down

0 comments on commit 9bf9a7f

Please sign in to comment.