Re: [PATCH] Shell programming: directories are ``executable'' (that is, searchable), too.

Subject: Re: [PATCH] Shell programming: directories are ``executable'' (that is, searchable), too.

Date: Sat, 05 Feb 2011 23:59:15 +0100

To: Thomas Schwinge, notmuch@notmuchmail.org

Cc: Thomas Schwinge

From: Michal Sojka


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

Thread: