Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 May 2019 11:01:42 +0200
From:      "Tobias C. Berner" <tcberner@freebsd.org>
To:        Alexey Dokuchaev <danfe@freebsd.org>
Cc:        "Tobias C. Berner" <tcberner@freebsd.org>, 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:  <CAOshKtfcEZ7AuwkfPs56yC9oMUmmL%2Bu7JcQO3mv_5WV2fip%2BEQ@mail.gmail.com>
In-Reply-To: <20190429065607.GA55169@FreeBSD.org>
References:  <201904281922.x3SJMLo2013472@repo.freebsd.org> <20190429065607.GA55169@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Moin moin


I don't really see how this escaping-hell is any nicer than using -0 :) .
Generating it via shell-script on the other-hand would also have the
benefit of freebsd-version
not being called when running "make index" and such...

Let's wait and see if we need more of the possible variables, and then
rework it in the next iteration.

mfg Tobias

On Mon, 29 Apr 2019 at 08:56, Alexey Dokuchaev <danfe@freebsd.org> wrote:

> 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?CAOshKtfcEZ7AuwkfPs56yC9oMUmmL%2Bu7JcQO3mv_5WV2fip%2BEQ>