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