From a690ee5ab819ef03176194b044a6854b2a07e1ab Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 28 Dec 2023 14:32:06 +0100 Subject: A non-zero exit status will be returned on one or more failure Tool will now use date-based versioning scheme: '%Y%m%d.N', where N will get incremented if multiple releases happen during a day. This is not done automatically currently. Some additional smaller changes were done to support exit status and versioning. --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 04b2a30..25e2cda 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,19 @@ +TODAY=1 PREFIX?=/usr/local BINDIR?=$(PREFIX)/bin DATADIR?=$(PREFIX)/share -MANDIR?=$(DATADIR)/man/man1 +MANDIR?=$(DATADIR)/man +MAN1DIR?=$(MANDIR)/man1 LIBDIR?=$(PREFIX)/lib SYSDDIR?=$(LIBDIR)/systemd/system USERSDIR?=$(LIBDIR)/sysusers.d all: mirror +%: %.sh + sed s/@VERSION@/`git rev-list -1 --date=format:%Y%m%d --pretty=%ad --no-commit-header HEAD`.$(TODAY)/g <$< >$@ + chmod +x $@ + clean: rm -f mirror @@ -17,14 +23,14 @@ install: all mkdir -p $(DESTDIR)$(SYSDDIR) mkdir -p $(DESTDIR)$(USERSDIR) cp -f mirror $(DESTDIR)$(BINDIR)/mirror - cp -f mirror.1 $(DESTDIR)$(MANDIR)/mirror.1 + cp -f mirror.1 $(DESTDIR)$(MAN1DIR)/mirror.1 cp -f mirror.timer $(DESTDIR)$(SYSDDIR)/mirror.timer cp -f mirror.service $(DESTDIR)$(SYSDDIR)/mirror.service cp -f mirror.conf $(DESTDIR)$(USERSDIR)/mirror.conf uninstall: rm -f $(DESTDIR)$(BINDIR)/mirror - rm -f $(DESTDIR)$(MANDIR)/mirror.1 + rm -f $(DESTDIR)$(MAN1DIR)/mirror.1 rm -f $(DESTDIR)$(SYSDDIR)/mirror.timer rm -f $(DESTDIR)$(SYSDDIR)/mirror.service rm -f $(DESTDIR)$(USERSDIR)/mirror.conf -- cgit v1.1