From b2cdbbb29716a731c88a4261f58cb154f263333b Mon Sep 17 00:00:00 2001
From: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date: Thu, 5 Oct 2017 15:15:19 +0200
Subject: [PATCH] docs/Makefile: make the install target actually work for a
 shared directory

---
 docs/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/Makefile b/docs/Makefile
index a65b9967..de9a6acf 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -41,10 +41,10 @@ sphinx/%:
 
 install: html
 	test -d $(HTMLDIR)
-	rsync -avuz $(BUILDDIR)/html/ $(INSTALL_HOST):$(INSTALL_DIR)/
+	rsync -rlvuz $(BUILDDIR)/html/ $(INSTALL_HOST):$(INSTALL_DIR)/
 	ssh $(INSTALL_HOST) \
-		"chgrp -R $(INSTALL_GROUP) $(INSTALL_DIR) ; \
-		 chmod -R $(INSTALL_PERMS) $(INSTALL_DIR) ; \
-		 find $(INSTALL_DIR) -type d -exec chmod g+s {} +"
+		"find $(INSTALL_DIR) -not -group $(INSTALL_GROUP) -exec chgrp -v $(INSTALL_GROUP) {} + ; \
+		 find $(INSTALL_DIR) -not -perm -ug=rw,o=r -exec chmod -v ug+rw,o+r {} + ; \
+		 find $(INSTALL_DIR) -type d -not -perm -g=xs,ou=x -exec chmod -v g+xs,ou+x {} +"
 
 .PHONY: help html clean distclean install
-- 
GitLab