build: don't clobber config file

Use `test -f` instead of `cp -n`, because the former is POSIX.

References: https://github.com/emersion/soju/pull/32
This commit is contained in:
Simon Ser 2021-10-08 09:11:31 +02:00
parent 94dbfff11d
commit 81782fefe8

View File

@ -27,6 +27,6 @@ install:
mkdir -p $(DESTDIR)/var/lib/soju mkdir -p $(DESTDIR)/var/lib/soju
cp -f soju sojuctl $(DESTDIR)$(PREFIX)/$(BINDIR) cp -f soju sojuctl $(DESTDIR)$(PREFIX)/$(BINDIR)
cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1 cp -f doc/soju.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
cp -f config.in $(DESTDIR)/etc/soju/config [ -f $(DESTDIR)/etc/soju/config ] || cp -f config.in $(DESTDIR)/etc/soju/config
.PHONY: soju sojuctl .PHONY: soju sojuctl