Inital commit
This commit is contained in:
26
Makefile
Normal file
26
Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
GO ?= go
|
||||
|
||||
.PHONY: build lint install uninstall install-openrc uninstall-openrc
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
$(GO) build -o hjem
|
||||
|
||||
lint:
|
||||
$(GO) vet ./...
|
||||
$(GO) fmt ./...
|
||||
|
||||
install:
|
||||
cp hjem /usr/local/bin
|
||||
|
||||
uninstall:
|
||||
$(RM) /usr/local/bin/hjem
|
||||
|
||||
install-openrc:
|
||||
cp hjem.initd /etc/init.d/hjem
|
||||
user="$${SUDO_USER:-$${DOAS_USER}}"; \
|
||||
echo "command_user=$$user" >> /etc/init.d/hjem
|
||||
|
||||
uninstall-openrc:
|
||||
$(RM) /etc/init.d/hjem
|
||||
Reference in New Issue
Block a user