Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
diff bin/check-ports @ 10:f08b39dacb21
Implemented "-A" and "-a" options for printing info for all installed packages and/or with LocalRepo data
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Sun, 22 Oct 2017 18:32:53 +0200 |
| parents | 6b77068e7ec8 |
| children | 5bf2bf962bf0 |
line wrap: on
line diff
--- 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
