Add uninstall rule to makefile

This commit is contained in:
Elara 2021-08-21 17:17:25 -07:00
parent 3dfa572eb3
commit a769bac3c2
2 changed files with 11 additions and 5 deletions

View File

@ -7,14 +7,20 @@ all:
go build $(GOFLAGS) go build $(GOFLAGS)
go build ./cmd/itctl $(GOFLAGS) go build ./cmd/itctl $(GOFLAGS)
clean:
rm -f itctl
rm -f itd
install: install:
install -Dm755 ./itd $(BIN_PREFIX)/itd install -Dm755 ./itd $(BIN_PREFIX)/itd
install -Dm755 ./itctl $(BIN_PREFIX)/itctl install -Dm755 ./itctl $(BIN_PREFIX)/itctl
install -Dm644 ./itd.service $(SERVICE_PREFIX)/itd.service install -Dm644 ./itd.service $(SERVICE_PREFIX)/itd.service
install -Dm644 ./itd.toml $(CFG_PREFIX)/itd.toml install -Dm644 ./itd.toml $(CFG_PREFIX)/itd.toml
clean: uninstall:
rm -f itctl rm $(BIN_PREFIX)/itd
rm -f itd rm $(BIN_PREFIX)/itctl
rm $(SERVICE_PREFIX)/itd.service
rm $(CFG_PREFIX)/itd.toml
.PHONY: all install clean .PHONY: all clean install uninstall

View File

@ -51,7 +51,7 @@ const (
) )
func startSocket(dev *infinitime.Device) error { 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) err := os.MkdirAll(filepath.Dir(SockPath), 0755)
if err != nil { if err != nil {
return err return err