Date: Tue, 29 Jun 2010 01:13:43 +0200 From: Gabor Kovesdan <gabor@FreeBSD.org> To: Paul Schmehl <pschmehl_lists@tx.rr.com> Cc: FreeBSD Ports <freebsd-ports@freebsd.org> Subject: Re: This construction doesn't work Message-ID: <4C292CA7.2080402@FreeBSD.org> In-Reply-To: <F2F73A9F749C437672E35BFB@utd65257.utdallas.edu> References: <F2F73A9F749C437672E35BFB@utd65257.utdallas.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Em 2010.06.29. 0:24, Paul Schmehl escreveu: > I'm working on a port update for one of the ports that I maintain, and > I've run into a problem that I can't seem to solve. > > I use this construction to ensure that the port doesn't overwrite the > conf file, if one exists: > > .for f in barnyard2.conf > ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f}-sample > [ -f ${PREFIX}/etc/${f} ] || \ > ${INSTALL_DATA} ${WRKSRC}/etc/${f} ${PREFIX}/etc/${f} > .endfor > > But it gets overwritten anyway. What am I doing wrong? I thought > this worked before, but I can't be sure. Testing proves that it does > not work now. I tried to changing to an if [ ! -f construction, but > that didn't do a thing. > I think it should work, I used to write the same in audio/shoutcast. Are you testing by installing from port or from package? It should work for ports but for packages, you need some more magic in pkg-plist. You can also refer to audio/shoutcast how it is done there. Maybe is it what you missed? Regards, Gabor
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C292CA7.2080402>