| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #!/bin/sh | | 1 | #!/bin/sh |
2 | # $NetBSD: mkreadme,v 1.28 2015/10/03 13:17:57 bsiegert Exp $ | | 2 | # $NetBSD: mkreadme,v 1.29 2016/07/07 11:29:34 wiz Exp $ |
3 | # | | 3 | # |
4 | # Script for README.html generation | | 4 | # Script for README.html generation |
5 | # | | 5 | # |
6 | # Copyright (c) 2002, 2005 The NetBSD Foundation, Inc. | | 6 | # Copyright (c) 2002, 2005 The NetBSD Foundation, Inc. |
7 | # All rights reserved. | | 7 | # All rights reserved. |
8 | # | | 8 | # |
9 | # This code is derived from software contributed to The NetBSD Foundation | | 9 | # This code is derived from software contributed to The NetBSD Foundation |
10 | # by Dan McMahill. | | 10 | # by Dan McMahill. |
11 | # | | 11 | # |
12 | # Redistribution and use in source and binary forms, with or without | | 12 | # Redistribution and use in source and binary forms, with or without |
13 | # modification, are permitted provided that the following conditions | | 13 | # modification, are permitted provided that the following conditions |
14 | # are met: | | 14 | # are met: |
15 | # 1. Redistributions of source code must retain the above copyright | | 15 | # 1. Redistributions of source code must retain the above copyright |
| @@ -260,51 +260,55 @@ echo "Starting README.html generation: ` | | | @@ -260,51 +260,55 @@ echo "Starting README.html generation: ` |
260 | | | 260 | |
261 | ###################################################################### | | 261 | ###################################################################### |
262 | # | | 262 | # |
263 | # Extract key pkgsrc configuration variables | | 263 | # Extract key pkgsrc configuration variables |
264 | # | | 264 | # |
265 | ###################################################################### | | 265 | ###################################################################### |
266 | | | 266 | |
267 | echo " " | | 267 | echo " " |
268 | echo "Extracting tool variables:" | | 268 | echo "Extracting tool variables:" |
269 | echo " " | | 269 | echo " " |
270 | if [ -d ${PKGSRCDIR}/pkgtools/prereq-readme ]; then | | 270 | if [ -d ${PKGSRCDIR}/pkgtools/prereq-readme ]; then |
271 | cd ${PKGSRCDIR}/pkgtools/prereq-readme | | 271 | cd ${PKGSRCDIR}/pkgtools/prereq-readme |
272 | eval "`${BMAKE} show-tools`" | | 272 | eval "`${BMAKE} show-tools`" |
273 | for v in AWK CMP ECHO EXPR FGREP FIND GREP GZIP_CMD SED SETENV SORT | | 273 | if [ "x$quiet" != "xno" ]; then |
274 | do | | 274 | for v in AWK CMP ECHO EXPR FGREP FIND GREP GZIP_CMD SED SETENV SORT |
275 | eval "echo '---->' ${v}=\"\${${v}}\"" | | 275 | do |
276 | done | | 276 | eval "echo '---->' ${v}=\"\${${v}}\"" |
| | | 277 | done |
| | | 278 | fi |
277 | else | | 279 | else |
278 | echo "Error: ${PKGSRCDIR}/pkgtools/prereq-readme does not seem to exist" | | 280 | echo "Error: ${PKGSRCDIR}/pkgtools/prereq-readme does not seem to exist" |
279 | exit 1 | | 281 | exit 1 |
280 | fi | | 282 | fi |
281 | | | 283 | |
282 | echo " " | | 284 | echo " " |
283 | echo "Extracting configuration variables:" | | 285 | echo "Extracting configuration variables:" |
284 | echo " " | | 286 | echo " " |
285 | if [ -d ${PKGSRCDIR}/pkgtools/prereq-readme ]; then | | 287 | if [ -d ${PKGSRCDIR}/pkgtools/prereq-readme ]; then |
286 | cd ${PKGSRCDIR}/pkgtools/prereq-readme | | 288 | cd ${PKGSRCDIR}/pkgtools/prereq-readme |
287 | for v in CDROM_PKG_URL_HOST CDROM_PKG_URL_DIR DISTDIR \ | | 289 | for v in CDROM_PKG_URL_HOST CDROM_PKG_URL_DIR DISTDIR \ |
288 | FTP_PKG_URL_HOST FTP_PKG_URL_DIR PACKAGES PKG_INFO PKG_SUFX PKG_ADMIN \ | | 290 | FTP_PKG_URL_HOST FTP_PKG_URL_DIR PACKAGES PKG_INFO PKG_SUFX PKG_ADMIN \ |
289 | AUDIT_PACKAGES AUDIT_PACKAGES_FLAGS PKGTOOLS_VERSION | | 291 | AUDIT_PACKAGES AUDIT_PACKAGES_FLAGS PKGTOOLS_VERSION |
290 | do | | 292 | do |
291 | val=`${BMAKE} show-var VARNAME=${v}` | | 293 | val=`${BMAKE} show-var VARNAME=${v}` |
292 | if [ $? != 0 ]; then | | 294 | if [ $? != 0 ]; then |
293 | echo "Error: make show-var VARNAME=${v} in `pwd` " | | 295 | echo "Error: make show-var VARNAME=${v} in `pwd` " |
294 | echo "Failed. This is a fatal error" | | 296 | echo "Failed. This is a fatal error" |
295 | clean_and_exit | | 297 | clean_and_exit |
296 | fi | | 298 | fi |
297 | echo "----> ${v}=\"${val}\"" | | 299 | if [ "x$quiet" != "xno" ]; then |
| | | 300 | echo "----> ${v}=\"${val}\"" |
| | | 301 | fi |
298 | eval "${v}=\"${val}\"" | | 302 | eval "${v}=\"${val}\"" |
299 | done | | 303 | done |
300 | else | | 304 | else |
301 | echo "Error: ${PKGSRCDIR}/pkgtools/prereq-readme does not seem to exist" | | 305 | echo "Error: ${PKGSRCDIR}/pkgtools/prereq-readme does not seem to exist" |
302 | exit 1 | | 306 | exit 1 |
303 | fi | | 307 | fi |
304 | | | 308 | |
305 | if [ `${PKG_ADMIN} -V` -lt 20080415 ]; then | | 309 | if [ `${PKG_ADMIN} -V` -lt 20080415 ]; then |
306 | SCAN_VULNERABILITIES=0 | | 310 | SCAN_VULNERABILITIES=0 |
307 | echo "----> NOT checking for vulnerabilities, pkg_install too old" | | 311 | echo "----> NOT checking for vulnerabilities, pkg_install too old" |
308 | else | | 312 | else |
309 | _PVDIR=`${PKG_ADMIN} config-var PKGVULNDIR`; | | 313 | _PVDIR=`${PKG_ADMIN} config-var PKGVULNDIR`; |
310 | if [ -e "${_PVDIR}"/pkg-vulnerabilities ]; then | | 314 | if [ -e "${_PVDIR}"/pkg-vulnerabilities ]; then |