Skip to content

Commit da42a58

Browse files
Add install target
1 parent 524c571 commit da42a58

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
MAKEFLAGS += --warn-undefined-variables
22
SHELL := /bin/sh
33

4+
PREFIX ?= /usr/local
5+
46
.PHONY: all
57
all: man
68

@@ -15,3 +17,10 @@ test:
1517
# SC1117 Backslash is literal in...
1618
# SC2059 Don't use variables in the printf format string. But we need to or colors won't work
1719
shellcheck -e SC1117,SC2059 mgitstatus
20+
21+
.PHONY: install
22+
install:
23+
install -d $(DESTDIR)$(PREFIX)/bin
24+
install -d $(DESTDIR)$(PREFIX)/man/man1
25+
install mgitstatus -m 755 $(DESTDIR)$(PREFIX)/bin/
26+
install mgitstatus.1 $(DESTDIR)$(PREFIX)/man/man1/

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ For more examples, see the [manual page](mgitstatus.1.md).
7171

7272
# Installation
7373

74-
mgitstatus requires a POSIX compliant shell. Bash will do fine.
74+
mgitstatus requires make.
7575

7676
The following steps will install mgitstatus:
7777

@@ -80,10 +80,10 @@ The following steps will install mgitstatus:
8080
$ cd multi-git-status
8181

8282
# Install globally (all users)
83-
$ sudo ./install.sh
83+
$ sudo make install
8484

8585
# Install locally (only your user)
86-
$ PREFIX=~/.local ./install.sh
86+
$ PREFIX=~/.local make install
8787

8888
# License
8989

0 commit comments

Comments
 (0)