svn commit: r500363 - in head/sysutils: . etc_os-release

Alexey Dokuchaev danfe at freebsd.org
Mon Apr 29 06:56:08 UTC 2019


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


More information about the svn-ports-all mailing list