From cafa354501c89f4f391344c796f2b63936ad8f06 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 13:07:48 +0100 Subject: [PATCH] 45-autodist-git-sync: added daily cron file for autodist-git repository sync --- Makefile | 1 + etc/cron.daily/45-autodist-git-sync | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100755 etc/cron.daily/45-autodist-git-sync diff --git a/Makefile b/Makefile index 7cb48cf..4c1d60e 100644 --- a/Makefile +++ b/Makefile @@ -105,6 +105,7 @@ install-data: @$(INSTALL_SCRIPT) etc/cron.hourly/65-autoport $(DESTDIR)$(sysconfdir)/cron.hourly/ @$(INSTALL_SCRIPT) etc/cron.daily/40-autodist-cleanold $(DESTDIR)$(sysconfdir)/cron.daily/ @$(INSTALL_SCRIPT) etc/cron.daily/40-autodist-upstream-updates $(DESTDIR)$(sysconfdir)/cron.daily/ + @$(INSTALL_SCRIPT) etc/cron.daily/45-autodist-git-sync $(DESTDIR)$(sysconfdir)/cron.daily/ @$(INSTALL_SCRIPT) etc/logrotate.d/webbuild $(DESTDIR)$(sysconfdir)/logrotate.d/webbuild @$(INSTALL_DATA) autospec-conf $(DESTDIR)$(pck_statedir)/.autospec @$(INSTALL_DATA) autodist-bashrc $(DESTDIR)$(pck_statedir)/.bashrc diff --git a/etc/cron.daily/45-autodist-git-sync b/etc/cron.daily/45-autodist-git-sync new file mode 100755 index 0000000..cfbe0df --- /dev/null +++ b/etc/cron.daily/45-autodist-git-sync @@ -0,0 +1,12 @@ +#!/bin/bash +# +# autodist-git-sync daily cron script +# (c) 2024 by Silvan Calarco +# +. /etc/autodist/config + +if [ "$AUTODIST_GIT_SYNC" == "1" ]; then + autodist-git syncrepo +fi + +exit 0