From 42e7222c46772e1533098bd9d3ea7e54c5e0360f Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 2 Nov 2020 08:56:37 +0100 Subject: [PATCH] Makefile: fix install targets Use `install` and set propper permissions. Fixes: #130 Signed-off-by: Valentin Rothberg --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d4aa789..825907e 100644 --- a/Makefile +++ b/Makefile @@ -108,12 +108,13 @@ endif .PHONY: install install: install-docs - cp $(BUILD_DIR)/$(NAME) $(BIN_DIR) - chmod 755 $(BIN_DIR)/$(NAME) + install -d -m 755 $(BIN_DIR) + install -m 755 $(BUILD_DIR)/$(NAME) $(BIN_DIR) .PHONY: install-docs install-docs: docs - sudo cp docs/*.1 ${MAN_DIR}/man1/ + install -d -m 755 ${MAN_DIR}/man1 + install -m 644 docs/*.1 ${MAN_DIR}/man1/ .PHONY: uninstall uninstall: