Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jun 2007 20:40:11 -0700
From:      Brian Somers <brian@Awfulhak.org>
To:        infofarmer@FreeBSD.org
Cc:        Martin Matuska <mm@FreeBSD.org>, Renato Botelho <garga@FreeBSD.org>, ports-committers@FreeBSD.org, sat@FreeBSD.org, cvs-all@FreeBSD.org, cvs-ports@FreeBSD.org, Craig Edwards <brain@inspircd.org>, Beech Rintoul <beech@FreeBSD.org>
Subject:   Re: cvs commit: ports/irc/inspircd Makefile pkg-plist
Message-ID:  <20070614204011.678c3e97@dev.lan.Awfulhak.org>
In-Reply-To: <cb5206420706132313x490ffabawc8b04edd203d3ac2@mail.gmail.com>
References:  <200706132339.l5DNd20L087121@repoman.freebsd.org> <20070613233906.A678716A558@hub.freebsd.org> <cb5206420706132313x490ffabawc8b04edd203d3ac2@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 Jun 2007 10:13:19 +0400 "Andrew Pantyukhin" <sat@FreeBSD.org> wrote:
> >  # Configure script is written in perl
> >  USE_PERL5_BUILD=yes
> > @@ -46,5 +48,9 @@
> >         @${STRIP_CMD} ${PREFIX}/lib/inspircd/modules/*.so
> >         @${STRIP_CMD} ${PREFIX}/lib/inspircd/*.so
> >         @${STRIP_CMD} ${PREFIX}/bin/inspircd
> > +.for FILE in censor conf filter helpop motd quotes rules
> > +       @${TEST} -f ${PREFIX}/etc/inspircd/inspircd.${FILE} || \
> > +               ${CP} ${PREFIX}/etc/inspircd/inspircd.${FILE}.example ${PREFIX}/etc/inspircd/inspircd.${FILE}
> > +.endfor  
> 
> We don't use this type of conditional in ports. It fails
> with non-zero status. Instead you should use if;then;fi,
> which always exits 0.

FWIW (ignoring the content), this syntax is better than 'if'.
As you say, 'if' always succeeds, however 'x || y' will
succeed if x, otherwise will run y, returning the result
to make.

Above, copy failures fail as expected.  If 'if' were used
they would not (unless you use 'set -e; if ...').

-- 
Brian Somers                                          <brian@Awfulhak.org>
Don't _EVER_ lose your sense of humour !               <brian@FreeBSD.org>



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