git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jeffrey C. Ollie" <jeff@ocjtech.us>
To: Jonas Fonseca <fonseca@diku.dk>
Cc: git@vger.kernel.org, "Jeffrey C. Ollie" <jeff@ocjtech.us>
Subject: [PATCH (tig)] Supply explicit permission bits to 'install'.
Date: Thu, 31 May 2007 14:20:32 -0500	[thread overview]
Message-ID: <11806392321132-git-send-email-jeff@ocjtech.us> (raw)

'install' will install files with permissions set to '0755' if the
permissions are not specified on the command line.  Having the execute
bits set on non-executable content is not desireable.  Specify mode
0644 for non-executable content as well as specify mode 0755 for
executable content (in case the defaults change or are different on
different systems).  Also tell 'install' to preserve timestamps.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
---
 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 57196b0..f9adecb 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ doc-html: $(HTMLDOC)
 install: all
 	mkdir -p $(DESTDIR)$(bindir) && \
 	for prog in $(PROGS); do \
-		install $$prog $(DESTDIR)$(bindir); \
+		install -p -m 0755 $$prog $(DESTDIR)$(bindir); \
 	done
 
 install-doc-man: doc-man
@@ -46,8 +46,8 @@ install-doc-man: doc-man
 		 $(DESTDIR)$(mandir)/man5
 	for doc in $(MANDOC); do \
 		case "$$doc" in \
-		*.1) install $$doc $(DESTDIR)$(mandir)/man1 ;; \
-		*.5) install $$doc $(DESTDIR)$(mandir)/man5 ;; \
+		*.1) install -p -m 0644 $$doc $(DESTDIR)$(mandir)/man1 ;; \
+		*.5) install -p -m 0644 $$doc $(DESTDIR)$(mandir)/man5 ;; \
 		esac \
 	done
 
-- 
1.5.2.GIT

             reply	other threads:[~2007-05-31 19:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31 19:20 Jeffrey C. Ollie [this message]
2007-05-31 19:54 ` [PATCH (tig)] Supply explicit permission bits to 'install' Jonas Fonseca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11806392321132-git-send-email-jeff@ocjtech.us \
    --to=jeff@ocjtech.us \
    --cc=fonseca@diku.dk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).