From 828ff79e7a0723541b29e2887629c6f26defae6c Mon Sep 17 00:00:00 2001 From: Erik Westrup Date: Sun, 16 Jan 2022 20:59:50 +0100 Subject: [PATCH] Fix make install failing when run multiple times Due to the security feature preventing checking in B2 credentials to git, the install target would get the same file twice due to pattern subsitution. This issue is not visible with BSD install as it ignores the issue, but GNU install wil fail. Fixes #46 --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1b23a58..bfc866e 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ ### Macros ### SRCS_SCRIPTS = $(filter-out %cron_mail, $(wildcard usr/local/sbin/*)) -SRCS_CONF = $(patsubst %.template, %, $(wildcard etc/restic/*)) +# $(sort) remove duplicates that comes from running make install >1 times. +SRCS_CONF = $(sort $(patsubst %.template, %, $(wildcard etc/restic/*))) SRCS_SYSTEMD = $(wildcard etc/systemd/system/*) # Just set PREFIX in environment, like