File tree Expand file tree Collapse file tree 2 files changed +25
-8
lines changed
Expand file tree Collapse file tree 2 files changed +25
-8
lines changed Original file line number Diff line number Diff line change 5858 git -C site commit -m '$(GITHUB_REF:refs/tags/v%=%)' index.html
5959.PHONY : site-bump
6060
61-
6261.PHONY : manpages
6362manpages :
6463 go run ./cmd/gen-docs --man-page --doc-path ./share/man/man1/
64+
65+ DESTDIR :=
66+ prefix := /usr/local
67+ bindir := ${prefix}/bin
68+ mandir := ${prefix}/share/man
69+
70+ .PHONY : install
71+ install : bin/gh manpages
72+ install -d ${DESTDIR}${bindir}
73+ install -m755 bin/gh ${DESTDIR}${bindir} /
74+ install -d ${DESTDIR}${mandir} /man1
75+ install -m644 ./share/man/man1/* ${DESTDIR}${mandir} /man1/
76+
77+ .PHONY : uninstall
78+ uninstall :
79+ rm -f ${DESTDIR}${bindir} /gh ${DESTDIR}${mandir} /man1/gh.1 ${DESTDIR}${mandir} /man1/gh-* .1
Original file line number Diff line number Diff line change 1515 $ cd gh-cli
1616 ```
1717
18- 2 . Build the project
18+ 2 . Build and install
1919
20- ```
21- $ make
20+ ``` sh
21+ # installs to '/usr/local' by default; sudo may be required
22+ $ make install
2223 ```
2324
24- 3 . Move the resulting ` bin/gh ` executable to somewhere in your PATH
25-
25+ To install to a different location:
2626 ``` sh
27- $ sudo mv ./bin/gh /usr/local/bin/
27+ $ make install prefix=/path/to/gh
2828 ```
2929
30- 4 . Run ` gh version ` to check if it worked.
30+ Make sure that the ` ${prefix}/bin ` directory is in your PATH.
31+
32+ 3 . Run ` gh version ` to check if it worked.
You can’t perform that action at this time.
0 commit comments