From 707022c3e83cc9d7311cf5bc05b646a13ec03af9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 31 Jan 2018 17:30:55 +0000 Subject: [PATCH] tools: unlink bash completion files before symlinking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "ln" will not replace an existing symlink, so if you run 'make install' twice, the second time will get an error: ln: failed to create symbolic link 'virsh': File exists We must always remove the symlink target first. Signed-off-by: Daniel P. Berrangé --- tools/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/Makefile.am b/tools/Makefile.am index e173f56347..4c33e78a1d 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -425,6 +425,7 @@ install-bash-completion: $(INSTALL_SCRIPT) $(srcdir)/bash-completion/vsh \ "$(DESTDIR)$(BASH_COMPLETIONS_DIR)/vsh" ( cd $(DESTDIR)$(BASH_COMPLETIONS_DIR) && \ + rm -f virsh virt-admin && \ $(LN_S) vsh virsh && \ $(LN_S) vsh virt-admin )