git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC/PATCH] Install templates directory using mkdir -p, not install -d

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Aug 23, 2008, 19:29 UTC
Message-ID
<1219519746-7438-1-git-send-email-vmiklos@frugalware.org>

The templates directory was previously installed using install -d, but install has no '-d' option for example on HP-UX.

Using mkdir -p instead seem to solve the problem.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---

I checked Linux and Solaris so far, both have mkdir -p -m. I'm not sure about other platforms, hence the RFC prefix.

 templates/Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/templates/Makefile b/templates/Makefile
index cc3fc30..5d35e51 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -4,7 +4,7 @@ ifndef V
 	QUIET = @
 endif
 
-INSTALL ?= install
+MKDIR ?= mkdir
 TAR ?= tar
 RM ?= rm -f
 prefix ?= $(HOME)
@@ -29,7 +29,7 @@ boilerplates.made : $(bpsrc)
 		case "$$boilerplate" in *~) continue ;; esac && \
 		dst=`echo "$$boilerplate" | sed -e 's|^this|.|;s|--|/|g'` && \
 		dir=`expr "$$dst" : '\(.*\)/'` && \
-		$(INSTALL) -d -m 755 blt/$$dir && \
+		$(MKDIR) -p -m 755 blt/$$dir && \
 		case "$$boilerplate" in \
 		*--) ;; \
 		*) cp -p $$boilerplate blt/$$dst ;; \
@@ -46,6 +46,6 @@ clean:
 	$(RM) -r blt boilerplates.made
 
 install: all
-	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
+	$(MKDIR) -p -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
 	(cd blt && $(TAR) cf - .) | \
 	(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xfo -)
-- 
1.6.0.rc3.17.gc14c8.dirty
Next: Junio C Hamano
Message 1 of 3 in “Install templates directory using mkdir -p, not install -d”
  1. Install templates directory using mkdir -p, not install -dMiklos Vajna, Aug 23, 2008
  2. Junio C HamanoAug 23, 2008
  3. Miklos VajnaAug 23, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.