#!/bin/bash # $HeadURL$ $LastChangedRevision$ # Modules . <(pcms-config --format=shell) . $(miniade) || { echo "${0##*/}: ERROR: miniade failed (hint: run 'miniade' to see error)" >&2; exit 1; } # Configurable stuff main() { local MY_ARGS # Defaults for options # Process options miniade_process_options MY_ARGS "$@" && set -- "${MY_ARGS[@]}" # Process arguments [ $# = 0 ] || miniade_bad_usage # Sanity checks and derivations # Guts ORPHANED_PACKAGES=$(debfoster -s | sed -e '/^There are no orphaned packages\.$/d' -e '/The following packages have been orphaned:$/d' | paste -s -d' ' | sed -r -e 's/^ +//' -e 's/ +$//' -e 's/ +/ /g') if [ "X$ORPHANED_PACKAGES" != X ]; then miniade_warning "orphaned packages: ${ORPHANED_PACKAGES// /, }" fi } main "$@"