unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] Shell programming: directories are ``executable'' (that is, searchable), too.
@ 2011-02-02 18:17 Thomas Schwinge
  2011-02-05 22:59 ` Michal Sojka
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Schwinge @ 2011-02-02 18:17 UTC (permalink / raw)
  To: notmuch; +Cc: Thomas Schwinge

Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
---
 test/test-lib.sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index f536172..3471ead 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -815,13 +815,14 @@ EOF
 }
 
 
+# Locate the directory containing the `notmuch' executable we are to use.
 find_notmuch_path ()
 {
     dir="$1"
 
     while [ -n "$dir" ]; do
 	bin="$dir/notmuch"
-	if [ -x "$bin" ]; then
+	if [ -f "$bin" -a -x "$bin" ]; then
 	    echo "$dir"
 	    return
 	fi
@@ -858,7 +859,7 @@ then
 
 	make_valgrind_symlink () {
 		# handle only executables
-		test -x "$1" || return
+		test -f "$1" -a -x "$1" || return
 
 		base=$(basename "$1")
 		symlink_target=$TEST_DIRECTORY/../$base
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Shell programming: directories are ``executable'' (that is, searchable), too.
  2011-02-02 18:17 [PATCH] Shell programming: directories are ``executable'' (that is, searchable), too Thomas Schwinge
@ 2011-02-05 22:59 ` Michal Sojka
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Sojka @ 2011-02-05 22:59 UTC (permalink / raw)
  To: Thomas Schwinge, notmuch; +Cc: Thomas Schwinge

On Wed, 02 Feb 2011, Thomas Schwinge wrote:
> Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
> ---
>  test/test-lib.sh |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index f536172..3471ead 100755
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -815,13 +815,14 @@ EOF
>  }
>  
>  
> +# Locate the directory containing the `notmuch' executable we are to use.
>  find_notmuch_path ()
>  {
>      dir="$1"
>  
>      while [ -n "$dir" ]; do
>  	bin="$dir/notmuch"
> -	if [ -x "$bin" ]; then
> +	if [ -f "$bin" -a -x "$bin" ]; then

Looks good to me. Thanks.

-Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-05 22:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-02 18:17 [PATCH] Shell programming: directories are ``executable'' (that is, searchable), too Thomas Schwinge
2011-02-05 22:59 ` Michal Sojka

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).