#!/bin/bash
#
# autodist autoupdate hourly cron script
# (c) 2008-2021 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
. /etc/autodist/config
. /etc/sysconfig/autoport

# FIXME: parametrize automaint call
if [ ! "$AUTOPORT_UPDATE_NO_AUTOMAINT" ]; then
   automaint -s devel-autodist -d base -p devel-makedist
fi

for i in `seq 0 ${#AUTOPORT_ARCH[*]}`; do
 echo "Running autodist-launcher ${i}"
 systemd-run -u autodist-launcher-${i} /usr/bin/autodist-launcher ${i}
done
