threads / patch / 327

patchCogito: do not clobber pre-existing $(bindir)'s mode

Subject: [PATCH] Cogito: do not clobber pre-existing $(bindir)'s mode

## tl;dr

2 messages between Apr 26, 2005 and Apr 26, 2005. Diffs are folded; open one to read it.

replies: 1people: 1as markdown or json

Sean Neakums· Apr 26, 2005, 10:23 UTC · lore
Show changes to diff +1 −1
Index: Makefile
===================================================================
--- f262000f302b749e485f5eb971e6aabefbb85680/Makefile  (mode:100644 sha1:4f01bbbbb3fd0e53e9ce968f167b6dae68fcfa92)
+++ uncommitted/Makefile  (mode:100644)
@@ -95,7 +95,7 @@
 	@chmod +x $@
 
 install: $(PROG) $(SCRIPTS) $(SCRIPT) $(GEN_SCRIPT)
-	install -m755 -d $(DESTDIR)$(bindir)
+	[ ! -d $(DESTDIR)$(bindir) ] && install -m755 -d $(DESTDIR)$(bindir)
 	install $(PROG) $(SCRIPTS) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(bindir)
 
 clean:
-- 
Dag vijandelijk luchtschip de huismeester is dood
Sean Neakums· Apr 26, 2005, 10:52 UTC · re: Sean Neakums · lore

Re: [PATCH] Cogito: do not clobber pre-existing $(bindir)'s mode

Here is one that actually works.
That'll teach me to be tricky.  (It won't.)
Show changes to diff +1 −1
Index: Makefile
===================================================================
--- f262000f302b749e485f5eb971e6aabefbb85680/Makefile  (mode:100644 sha1:4f01bbbbb3fd0e53e9ce968f167b6dae68fcfa92)
+++ uncommitted/Makefile  (mode:100644)
@@ -95,7 +95,7 @@
 	@chmod +x $@
 
 install: $(PROG) $(SCRIPTS) $(SCRIPT) $(GEN_SCRIPT)
-	install -m755 -d $(DESTDIR)$(bindir)
+	[ -d $(DESTDIR)$(bindir) ] || install -m755 -d $(DESTDIR)$(bindir)
 	install $(PROG) $(SCRIPTS) $(SCRIPT) $(GEN_SCRIPT) $(DESTDIR)$(bindir)
 
 clean:
-- 
Dag vijandelijk luchtschip de huismeester is dood

← back to recent threads