aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 2824074..64b35c2 100644
--- a/Makefile
+++ b/Makefile
@@ -15,16 +15,22 @@ runlocal:
go build -ldflags "-X 'github.com/LMBishop/scrapbook/pkg/constants.SysConfDir=${PWD}/runlocal/config' -X 'github.com/LMBishop/scrapbook/pkg/constants.SysDataDir=${PWD}/runlocal/data'" -o runlocal/${BINARY_NAME} main.go
cd runlocal; ./${BINARY_NAME}
-install: build
+.PHONY: install
+install:
install -Dm755 ${BINARY_NAME} /usr/local/bin/${BINARY_NAME}
-installconf:
+.PHONY: install-config
+install-config:
+ install --backup -Dm755 dist/config.toml ${SYS_CONF_DIR}/config.toml
+
+.PHONY: install-service
+install-service:
install -Dm755 dist/scrapbook.service ${SYSTEMD_DIR}/
- install -Dm755 dist/config.toml ${SYS_CONF_DIR}/config.toml
if ! getent passwd scrapbook > /dev/null; then \
useradd --system --create-home --shell /usr/sbin/nologin --home-dir ${SYS_DATA_DIR} scrapbook ;\
fi
+.PHONY: clean
clean:
go clean
- rm ${BINARY_NAME} \ No newline at end of file
+ rm ${BINARY_NAME}