]> oss.titaniummirror.com Git - git-utils.git/commitdiff
Add Makefile to install and uninstall git utils master
authorR. Steve McKown <rsmckown@gmail.com>
Wed, 16 Mar 2016 23:23:17 +0000 (17:23 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Wed, 16 Mar 2016 23:24:30 +0000 (17:24 -0600)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..dd1d0ec
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+# Install and uninstall git utilities and man pages
+
+install: progs man1
+
+uninstall: unprogs unman1
+
+progs:
+       cp $$(ls git-* | grep -v '\.[0-9]') /usr/local/bin
+
+man1:
+       mkdir -p /usr/local/man/$@
+       cp $$(ls git-*.1) /usr/local/man/$@
+
+unprogs:
+       for f in $$(ls git-* | grep -v '\.[0-9]'); do \
+               rm /usr/local/bin/$$f; \
+       done || exit 0
+
+unman1:
+       for f in $$(ls git-*.1); do \
+               rm /usr/local/man/man1/$$f; \
+       done || exit 0
+
+.PHONY: all install progs man1