From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Petr Baudis <pasky@suse.cz>
Cc: Bert Wesarg <bert.wesarg@googlemail.com>, git@vger.kernel.org
Subject: [TopGit PATCH] tg.sh: Check for read permissions of help files
Date: Wed, 6 Aug 2008 10:02:51 +0200 [thread overview]
Message-ID: <1218009771-30358-1-git-send-email-bert.wesarg@googlemail.com> (raw)
We currently check only for '-f' but we need to have read permissions as well.
And help files don't need the execution bit set.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
Makefile | 2 +-
tg.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 238d07d..f9dbe6e 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ install:: all
install -d -m 755 "$(hooksdir)"
install $(hooks_out) "$(hooksdir)"
install -d -m 755 "$(sharedir)"
- install $(help_out) "$(sharedir)"
+ install -m 644 $(help_out) "$(sharedir)"
clean::
rm -f tg $(commands_out) $(hooks_out) $(help_out)
diff --git a/tg.sh b/tg.sh
index 03a392b..edac006 100644
--- a/tg.sh
+++ b/tg.sh
@@ -154,7 +154,7 @@ do_help()
if [ -z "$1" ] ; then
echo "TopGit v0.1 - A different patch queue manager"
echo "Usage: tg (create|delete|info|patch|summary|update|help) ..."
- elif [ -f "@sharedir@/tg-$1.txt" ] ; then
+ elif [ -f "@sharedir@/tg-$1.txt" -a -r "@sharedir@/tg-$1.txt" ] ; then
cat "@sharedir@/tg-$1.txt"
else
echo "`basename $0`: no help for $1" 1>&2
--
tg: (e311d15..) t/check-read-permissions-of-help-files (depends on: master)
next prev reply other threads:[~2008-08-06 8:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 6:43 [TopGit PATCH] tg.sh: it's info/attributes not info/gitattributes Bert Wesarg
2008-08-07 16:39 ` [TopGit PATCH] Makefile: mkdir $(bindir) Bert Wesarg
2008-08-06 8:02 ` Bert Wesarg [this message]
2008-08-06 7:49 ` [TopGit PATCH] tg.sh: Runtime tg-* command check Bert Wesarg
2008-08-06 2:43 ` [PATCH] [TopGit] Pretty print the help creation commands in Makefile Russell Steicke
2008-08-09 0:28 ` Petr Baudis
2008-08-09 7:35 ` [TopGit PATCH] tg.sh: Check for read permissions of help files Bert Wesarg
2008-08-09 8:24 ` Petr Baudis
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=1218009771-30358-1-git-send-email-bert.wesarg@googlemail.com \
--to=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
/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).