X-Git-Url: https://code.delx.au/monosys/blobdiff_plain/2200fcd58251a4e688f80014596068c358306944..3670c0ad421b86a297a56b737a0b8f455e87b49d:/healthcheck/packages diff --git a/healthcheck/packages b/healthcheck/packages new file mode 100755 index 0000000..87c6917 --- /dev/null +++ b/healthcheck/packages @@ -0,0 +1,34 @@ +#!/bin/bash + +set -eu + +if [ -z "${CHRONIC_WRAPPED:-}" ]; then + export CHRONIC_WRAPPED=1 + exec chronic -e "$0" +fi + +. /etc/os-release + +function is_debian { + [ "$ID" = debian ] || [ "${ID_LIKE:-}" = debian ] +} + +function is_arch { + [ "$ID" = arch ] +} + +if is_debian; then + echo "# aptorphan" + aptorphan 1>&2 + + echo "# aptitude search ~U" + aptitude search ~U 1>&2 +fi + +if is_arch; then + echo "# pacorphan" + pacorphan 1>&2 + + echo "# checkupdates" + checkupdates 1>&2 +fi