From 81fe634ed8d2edcf9aee9fe5ad4a37c5a5872b2a Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Sat, 21 Aug 2021 17:17:25 -0700 Subject: [PATCH] Add uninstall rule to makefile --- Makefile | 14 ++++++++++---- socket.go | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 05e277e..700bcc3 100644 --- a/Makefile +++ b/Makefile @@ -7,14 +7,20 @@ all: go build $(GOFLAGS) go build ./cmd/itctl $(GOFLAGS) +clean: + rm -f itctl + rm -f itd + install: install -Dm755 ./itd $(BIN_PREFIX)/itd install -Dm755 ./itctl $(BIN_PREFIX)/itctl install -Dm644 ./itd.service $(SERVICE_PREFIX)/itd.service install -Dm644 ./itd.toml $(CFG_PREFIX)/itd.toml -clean: - rm -f itctl - rm -f itd +uninstall: + rm $(BIN_PREFIX)/itd + rm $(BIN_PREFIX)/itctl + rm $(SERVICE_PREFIX)/itd.service + rm $(CFG_PREFIX)/itd.toml -.PHONY: all install clean \ No newline at end of file +.PHONY: all clean install uninstall \ No newline at end of file diff --git a/socket.go b/socket.go index b88062e..6a1c071 100644 --- a/socket.go +++ b/socket.go @@ -51,7 +51,7 @@ const ( ) func startSocket(dev *infinitime.Device) error { - // Make socket directory if non existant + // Make socket directory if non-existent err := os.MkdirAll(filepath.Dir(SockPath), 0755) if err != nil { return err