From 5a1bba86589568898e545b5f9a256f4f93ebc796 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Wed, 6 Aug 2008 10:02:51 +0200 Subject: [PATCH] tg.sh: Check for read permissions of help files 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. [pb: Simplified test.] Signed-off-by: Bert Wesarg Signed-off-by: Petr Baudis --- Makefile | 2 +- tg.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2975f29..1352d03 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,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 179f0de..ead2361 100644 --- a/tg.sh +++ b/tg.sh @@ -167,7 +167,7 @@ do_help() echo "TopGit v0.1 - A different patch queue manager" echo "Usage: tg ($cmds|help) ..." - elif [ -f "@sharedir@/tg-$1.txt" ] ; then + elif [ -r "@sharedir@/tg-$1.txt" ] ; then cat "@sharedir@/tg-$1.txt" else echo "`basename $0`: no help for $1" 1>&2 -- 2.30.2