cvs commit: ports/irc/inspircd Makefile pkg-plist
Brian Somers
brian at Awfulhak.org
Fri Jun 15 03:40:37 UTC 2007
On Thu, 14 Jun 2007 10:13:19 +0400 "Andrew Pantyukhin" <sat at 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 at Awfulhak.org>
Don't _EVER_ lose your sense of humour ! <brian at FreeBSD.org>
More information about the cvs-all
mailing list