Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jun 2018 16:44:20 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r334791 - head/share/mk
Message-ID:  <20180607164420.GA93814@FreeBSD.org>
In-Reply-To: <201806071616.w57GGMIo017645@repo.freebsd.org>
References:  <201806071616.w57GGMIo017645@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 07, 2018 at 04:16:22PM +0000, Bryan Drewery wrote:
> New Revision: 334791
> URL: https://svnweb.freebsd.org/changeset/base/334791
> 
> Log:
>   Stop using head(1) which is not available in installworld.
> ...
> @@ -49,7 +49,7 @@ ${var}=	${${var}.${${X_}_ld_hash}}
>  
>  .if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD})
>  .if !defined(${X_}LINKER_TYPE) || !defined(${X_}LINKER_VERSION)
> -_ld_version!=	(${${ld}} --version || echo none) | head -n 1
> +_ld_version!=	(${${ld}} --version || echo none) | sed -n '1,1p'

You don't need to specify the range actually, and the quotes.  Simple
`sed -n 1p' looks shorter and does not raise unnecessary questions.

./danfe



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