From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 18B13139694 for ; Tue, 25 Jul 2017 12:48:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2E000E0C5C; Tue, 25 Jul 2017 12:48:38 +0000 (UTC) Received: from foo.stuge.se (foo.stuge.se [212.116.89.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 929F6E0BE2 for ; Tue, 25 Jul 2017 12:48:36 +0000 (UTC) Received: (qmail 17760 invoked by uid 1000); 25 Jul 2017 12:48:33 -0000 Date: Tue, 25 Jul 2017 12:48:33 +0000 From: Peter Stuge To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] New eclass: opam.eclass Message-ID: <20170725124833.GX12397@stuge.se> References: <20170724172032.0a6623dc@gentoo.org> <20170724221139.GC15937@gengoff> <20170725102558.79b2cbaa@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170725102558.79b2cbaa@gentoo.org> X-Archives-Salt: a12a4944-9d74-4662-92fa-6089e29ad07b X-Archives-Hash: 106cf5af6892cb80e3c3c78c9f16b6ec Good work on the refactoring! Alexis Ballier wrote: > > > if [ -d "${ED}/usr/share/doc/${PF}/${PN}" ] ; then > > > > It’s always been recommended to me that we should use the [[ … ]] > > form. > > Doesn't make much difference here Some; you need neither quote nor {} in expansions within [[ ]]. So instead of the above one could write: if [[ -d $ED/usr/share/doc/$PF/$PN ]]; then > and I've always been recommending the other way :p .. > if you only do ebuilds or bash, then you don't care, but I definitely > do other scripts Be that as it may this is an eclass, and I think conforming to an established coding style has significant value. I too have understood that to be [[ ]]. Thanks //Peter