Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison bin/check-ports @ 51:9e131a355fbe
Refactor: new -s (short-mode) implementation and new loop architecture
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Thu, 23 Nov 2017 09:41:11 +0100 |
| parents | f4352f7b5c86 |
| children | 634113c53f56 |
comparison
equal
deleted
inserted
replaced
| 50:f4352f7b5c86 | 51:9e131a355fbe |
|---|---|
| 176 exit 1 | 176 exit 1 |
| 177 fi | 177 fi |
| 178 get_remote_repo_data ${LOCAL_REPO} ${_installed_name} | 178 get_remote_repo_data ${LOCAL_REPO} ${_installed_name} |
| 179 get_remote_repo_data ${LOCALBSDPORTS_REPO} ${_installed_name} | 179 get_remote_repo_data ${LOCALBSDPORTS_REPO} ${_installed_name} |
| 180 get_remote_repo_data ${FREEBSD_REPO} ${_installed_name} | 180 get_remote_repo_data ${FREEBSD_REPO} ${_installed_name} |
| 181 if [ \( -n "${alldata_flag}" \) -o \( \( "${llabel}" != '?' -a "${llabel}" != '=' \) -o \( "${remote_FreeBSD_label}" != '?' -a "${remote_FreeBSD_label}" != '=' \) -o \( "${remote_LocalBSDPorts_label}" != '?' -a "${remote_LocalBSDPorts_label}" != '=' \) -o \( "${remote_LocalRepo_label}" != '?' -a "${remote_LocalRepo_label}" != '=' \) \) -o \( "${repository}" = "${PORTS_DIRECT_INSTALLED_REPO}" \) ]; then | 181 _print_detail="" |
| 182 _print_detail="" | 182 if [ \( -n "${alldata_flag}" \) ]; then |
| 183 _print_detail=1 | |
| 184 else | |
| 183 if [ -n "${short_flag}" ]; then | 185 if [ -n "${short_flag}" ]; then |
| 184 # | 186 # |
| 185 # NOTE: -s and -A/-a are incompatible: so "alldata_XXX" needs not | 187 # NOTE: -s and -A/-a are incompatible: so "alldata_XXX" needs not |
| 186 # to be checked! | 188 # to be checked! |
| 187 # | 189 # |
| 188 case "${repository}" in | 190 case "${repository}" in |
| 189 "${FREEBSD_REPO}") | 191 "${FREEBSD_REPO}") |
| 190 if [ "${llabel}" != '<' -o "${remote_FreeBSD_label}" != '=' -o "${remote_LocalRepo_label}" != '?' -o "${remote_LocalBSDPorts_label}" != '?' ]; then | 192 if [ \( "${llabel}" != '<' -a "${llabel}" != '=' \) -o "${remote_FreeBSD_label}" != '=' -o "${remote_LocalRepo_label}" != '?' -o "${remote_LocalBSDPorts_label}" != '?' ]; then |
| 191 _print_detail=1 | |
| 192 fi | |
| 193 ;; | |
| 194 "${LOCAL_REPO}") | |
| 195 _print_detail=1 | |
| 196 ;; | |
| 197 "${LOCALBSDPORTS_REPO}") | |
| 198 if [ "${llabel}" != '=' -o "${remote_FreeBSD_label}" != '>' -o "${remote_LocalRepo_label}" != '?' -o "${remote_LocalBSDPorts_label}" = '?' -o "${remote_LocalBSDPorts_label}" = '<' ]; then | |
| 199 _print_detail=1 | 193 _print_detail=1 |
| 200 fi | 194 fi |
| 201 ;; | 195 ;; |
| 202 "${PORTS_DIRECT_INSTALLED_REPO}") | 196 "${LOCAL_REPO}") |
| 203 _print_detail=1 | 197 _print_detail=1 |
| 204 ;; | 198 ;; |
| 205 *) | 199 "${LOCALBSDPORTS_REPO}") |
| 206 echo "ERROR: unhandled repository: ${repository}" >&2 | 200 if [ "${llabel}" != '=' -o "${remote_FreeBSD_label}" != '>' -o "${remote_LocalRepo_label}" != '?' -o "${remote_LocalBSDPorts_label}" = '?' -o "${remote_LocalBSDPorts_label}" = '<' ]; then |
| 207 exit 1 | 201 _print_detail=1 |
| 208 ;; | 202 fi |
| 209 esac | 203 ;; |
| 204 "${PORTS_DIRECT_INSTALLED_REPO}") | |
| 205 _print_detail=1 | |
| 206 ;; | |
| 207 *) | |
| 208 echo "ERROR: unhandled repository: ${repository}" >&2 | |
| 209 exit 1 | |
| 210 ;; | |
| 211 esac | |
| 210 else | 212 else |
| 211 _print_detail=1 | 213 if [ \( \( "${llabel}" != '?' -a "${llabel}" != '=' \) -o \( "${remote_FreeBSD_label}" != '?' -a "${remote_FreeBSD_label}" != '=' \) -o \( "${remote_LocalBSDPorts_label}" != '?' -a "${remote_LocalBSDPorts_label}" != '=' \) -o \( "${remote_LocalRepo_label}" != '?' -a "${remote_LocalRepo_label}" != '=' \) \) -o \( "${repository}" = "${PORTS_DIRECT_INSTALLED_REPO}" \) ]; then |
| 212 fi | 214 : |
| 213 if [ -n "${_print_detail}" ]; then | 215 else |
| 214 print_title "${lfqp}" "${repository}" | 216 _print_detail=1 |
| 215 echo " INDEX: ${llabel} ${ldescr}" | |
| 216 echo " FreeBSD: ${remote_FreeBSD_label} ${remote_FreeBSD_descr}" | |
| 217 if [ \( -n "${alldata_LocalBSDPorts_flag}" \) -o \( "${remote_LocalBSDPorts_label}" != '?' \) ] ; then | |
| 218 echo " LocalBSDPorts: ${remote_LocalBSDPorts_label} ${remote_LocalBSDPorts_descr}" | |
| 219 fi | 217 fi |
| 220 if [ \( -n "${alldata_LocalRepo_flag}" \) -o \( "${remote_LocalRepo_label}" != '?' \) ] ; then | 218 fi |
| 221 echo " LocalRepo: ${remote_LocalRepo_label} ${remote_LocalRepo_descr}" | 219 fi |
| 222 fi | 220 if [ -n "${_print_detail}" ]; then |
| 221 print_title "${lfqp}" "${repository}" | |
| 222 echo " INDEX: ${llabel} ${ldescr}" | |
| 223 echo " FreeBSD: ${remote_FreeBSD_label} ${remote_FreeBSD_descr}" | |
| 224 if [ \( -n "${alldata_LocalBSDPorts_flag}" \) -o \( "${remote_LocalBSDPorts_label}" != '?' \) ] ; then | |
| 225 echo " LocalBSDPorts: ${remote_LocalBSDPorts_label} ${remote_LocalBSDPorts_descr}" | |
| 226 fi | |
| 227 if [ \( -n "${alldata_LocalRepo_flag}" \) -o \( "${remote_LocalRepo_label}" != '?' \) ] ; then | |
| 228 echo " LocalRepo: ${remote_LocalRepo_label} ${remote_LocalRepo_descr}" | |
| 223 fi | 229 fi |
| 224 fi | 230 fi |
| 225 done <<EOF856661111299999 | 231 done <<EOF856661111299999 |
| 226 ${local_index_versions} | 232 ${local_index_versions} |
| 227 EOF856661111299999 | 233 EOF856661111299999 |
