Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Apr 2019 06:56:07 +0000
From:      Alexey Dokuchaev <danfe@freebsd.org>
To:        "Tobias C. Berner" <tcberner@freebsd.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r500363 - in head/sysutils: . etc_os-release
Message-ID:  <20190429065607.GA55169@FreeBSD.org>
In-Reply-To: <201904281922.x3SJMLo2013472@repo.freebsd.org>
References:  <201904281922.x3SJMLo2013472@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Apr 28, 2019 at 07:22:21PM +0000, Tobias C. Berner wrote:
> New Revision: 500363
> URL: https://svnweb.freebsd.org/changeset/ports/500363
> 
> Log:
>   New port: sysutils/etc_os-release

Perhaps `misc' would've been a better category, since it's not strictly
an utility.  Missed this in the review, sorry.

> +CONTENTS=	'NAME=FreeBSD\0'$\
> +		'VERSION=${VERSION}\0'$\
> +		'ID=${VERSION_ID}\0'$\
> +		'VERSION_ID=freebsd\0'$\
> +		'ANSI_COLIR="0;31"\0'$\
> +		'PRETTY_NAME="FreeBSD ${VERSION}"\0'$\
> +		'CPE_NAME=cpe:/o:freebsd:freebsd:${VERSION_ID}\0'$\
> +		'HOME_URL=https://freebsd.org/\0'$\
> +		'BUG_REPORT_URL=https://bugs.freebsd.org'

Oh, this is so ugly.  Please consider something like this:

CONTENTS=       "NAME=FreeBSD" \
                "VERSION=${VERSION}" \
                "VERSION_ID=${VERSION_ID}" \
                "ID=${OPSYS:tl}" \
                "ANSI_COLOR=\\\"0;31\\\"" \
                "PRETTY_NAME=\\\"${OPSYS}\ ${VERSION}\\\"" \
                "CPE_NAME=cpe:/o:freebsd:freebsd:${VERSION_ID}" \
                "HOME_URL=https://freebsd.org/" \
                "BUG_REPORT_URL=https://bugs.freebsd.org"

Then you don't need -0 for xargs(1) and there's no extra newline at EOF.

./danfe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190429065607.GA55169>