# HG changeset patch # User Franz Glasner # Date 1508689973 -7200 # Node ID f08b39dacb21b6d6451c166f1b7cd9416ea3532c # Parent 6b77068e7ec83ef5a0364170f104bb34237521b5 Implemented "-A" and "-a" options for printing info for all installed packages and/or with LocalRepo data diff -r 6b77068e7ec8 -r f08b39dacb21 bin/check-ports --- a/bin/check-ports Sun Oct 22 18:21:35 2017 +0200 +++ b/bin/check-ports Sun Oct 22 18:32:53 2017 +0200 @@ -76,10 +76,19 @@ return 2 } +alldata_flag="" +alldata_LocalRepo_flag="" verbose_flag="" -while getopts "v" _arg ; do - case ${_arg} in +while getopts "Aav" _opt ; do + case ${_opt} in + A) + alldata_flag=1 + alldata_LocalRepo_flag=1 + ;; + a) + alldata_flag=1 + ;; v) verbose_flag=1 ;; @@ -113,13 +122,13 @@ get_remote_repo_data ${LOCAL_REPO} ${_installed_name} get_remote_repo_data ${FREEBSD_REPO} ${_installed_name} get_repo_for_package ${_installed_name} - if [ \( ${llabel} != '?' -a ${llabel} != '=' \) -o \( ${remote_FreeBSD_label} != '?' -a ${remote_FreeBSD_label} != '=' \) -o \( ${remote_LocalRepo_label} != '?' -a ${remote_LocalRepo_label} != '=' \) ] ; then + if [ \( -n "${alldata_flag}" \) -o \( ${llabel} != '?' -a ${llabel} != '=' \) -o \( ${remote_FreeBSD_label} != '?' -a ${remote_FreeBSD_label} != '=' \) -o \( ${remote_LocalRepo_label} != '?' -a ${remote_LocalRepo_label} != '=' \) ] ; then if [ -z "${verbose_flag}" ] ; then echo "${lfqp} (${repository})" fi echo " ${ldescr}" echo " FreeBSD: ${remote_FreeBSD_descr}" - if [ ${remote_LocalRepo_label} != '?' ] ; then + if [ \( -n "${alldata_LocalRepo_flag}" \) -o \( ${remote_LocalRepo_label} != '?' \) ] ; then echo " LocalRepo: ${remote_LocalRepo_descr}" fi fi