#!/bin/bash set -e basedir=`dirname "$0"` case "$basedir" in .|..) basedir="$basedir/.." ;; *) basedir=`dirname "$basedir"` ;; esac cd $basedir . global-settings if [ x"`whoami`" != x"$OURUSER" ]; then echo >&2 "$0 must be run as $OURUSER, skipping" exit 0 fi for f in crontab forward-suffix forward-slimy do d=$f g=$f.combined >$g case $f in forward-*) d=.$d; echo '# Exim filter' >>$g ;; esac echo '# autogenerated - do not edit' >>$g if test -f $f.part; then cat $f.part >>$g; fi cat live-*/$f.part >>$g if test -f $f.part-tail; then cat $f.part-tail >>$g; fi mv -f $g $d case $f in crontab) crontab crontab ;; esac done