From cac075e83aed7184f08eda6153e93b6244b7483d Mon Sep 17 00:00:00 2001 From: dmcmahill Date: Thu, 19 May 2005 11:46:40 +0000 Subject: allow spaces after the "=" in the .pkgcache files. This was noted with some of the older packages on ftp.netbsd.org. For example, pkg_info -B ftp://ftp.netbsd.org/pub/NetBSD/packages/1.5.2/vax/All/cascade-1.4.tgz will give OPSYS= NetBSD instead of OPSYS=NetBSD --- mk/scripts/genreadme.awk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mk') diff --git a/mk/scripts/genreadme.awk b/mk/scripts/genreadme.awk index 378bc0d376b..fa2c3e0c793 100755 --- a/mk/scripts/genreadme.awk +++ b/mk/scripts/genreadme.awk @@ -1,5 +1,5 @@ #!/usr/bin/awk -f -# $NetBSD: genreadme.awk,v 1.14 2005/05/19 03:50:39 dmcmahill Exp $ +# $NetBSD: genreadme.awk,v 1.15 2005/05/19 11:46:40 dmcmahill Exp $ # # Copyright (c) 2002, 2003, 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -816,14 +816,14 @@ function load_cache_file( file ) { osver = "unknown"; march = "unknown"; } else if( $0 ~/^OPSYS=/ ) { - opsys = $1; - gsub(/OPSYS=/, "", opsys); + opsys = $0; + gsub(/OPSYS=[ \t]*/, "", opsys); } else if( $0 ~/^OS_VERSION=/ ) { - osver = $1; - gsub(/OS_VERSION=/, "", osver); + osver = $0; + gsub(/OS_VERSION=[ \t]*/, "", osver); } else if( $0 ~/^MACHINE_ARCH=/ ) { - march = $1; - gsub(/MACHINE_ARCH=/, "", march); + march = $0; + gsub(/MACHINE_ARCH=[ \t]*/, "", march); } else if( $0 ~/^pkgcache_end /) { if( debug ) printf("\t%s, OPSYS=%s, OS_VERSION=%s, MACHINE_ARCH=%s\n", pkgfile, opsys, osver, march); -- cgit v1.2.3