#!/usr/bin/env bash # usage usage() { USAGE=$( cat < /dev/null || { echo "Requiring 'hostname' but it's not installed"; exit 1; } } source_config "$HOME/.check_updates.conf" "/etc/check_updates.conf" apply_defaults check_required CHECK_UPDATES_UPDATES_AMOUNT=$(eval "${CHECK_UPDATES_UPDATES_AMOUNT_CMD}") HOSTNAME=$(hostname) if [[ "$CHECK_UPDATES_UPDATES_AMOUNT" -gt "0" ]]; then CHECK_UPDATES_UPDATES=$(eval "${CHECK_UPDATES_UPDATES_CMD}") SUBJECT="[updates ${HOSTNAME}]" MESSAGE=$(cat <