hfingerd

hhvn.uk:79
Log | Files | Refs | LICENSE

commit 2605f631631c828f7d38d0bf8aa5dee6748c9c0c
parent a655c0158e0645f2b0e8ed16a06b008d7456e36f
Author: hhvn <dev@hhvn.uk>
Date:   Sun,  6 Jun 2021 02:28:32 +0100

makefile: create symlink hfingerd <-> fingerd

Diffstat:
Mmakefile | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/makefile b/makefile @@ -2,6 +2,7 @@ PREFIX = /usr/local CC ?= cc OBJ = main.o handler.o strlcpy.o BIN = hfingerd +LINK = fingerd COMMIT = `git log HEAD...HEAD~1 --pretty=format:%h` $(BIN): $(OBJ) @@ -18,7 +19,16 @@ install: $(BIN) sed "s/COMMIT/$(COMMIT)/" \ < $(BIN).8 \ > $(PREFIX)/share/man/man8/$(BIN).8 + -ln -s $(PREFIX)/bin/$(BIN) $(PREFIX)/bin/$(LINK) \ + 2>/dev/null || true + -ln -s $(PREFIX)/share/man/man8/$(BIN).8 \ + $(PREFIX)/share/man/man8/$(LINK).8 \ + 2>/dev/null || true uninstall: -rm $(PREFIX)/bin/$(BIN) -rm $(PREFIX)/share/man/man8/$(BIN).8 + -[ -h $(PREFIX)/bin/$(LINK) ] && \ + rm $(PREFIX)/bin/$(LINK) + -[ -h $(PREFIX)/share/man/man8/$(BIN).8 ] && \ + rm $(PREFIX)/share/man/man8/$(BIN).8