Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 62685431FB6 for ; Wed, 2 Feb 2011 10:17:54 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 91fhkh4SSTUF for ; Wed, 2 Feb 2011 10:17:53 -0800 (PST) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.18.15]) by olra.theworths.org (Postfix) with ESMTP id 510B9431FB5 for ; Wed, 2 Feb 2011 10:17:53 -0800 (PST) Received: from [87.180.46.33] (helo=stokes.schwinge.homeip.net) by smtprelay03.ispgateway.de with esmtpa (Exim 4.68) (envelope-from ) id 1PkhH4-0006EB-F6 for notmuch@notmuchmail.org; Wed, 02 Feb 2011 19:17:50 +0100 Received: (qmail 3414 invoked from network); 2 Feb 2011 18:17:23 -0000 Received: from schwinge.homeip.net (87.180.46.33) by stokes.schwinge.homeip.net with QMQP; 2 Feb 2011 18:17:23 -0000 Received: (nullmailer pid 27741 invoked by uid 1000); Wed, 02 Feb 2011 18:17:21 -0000 From: Thomas Schwinge To: notmuch@notmuchmail.org Subject: [PATCH] Shell programming: directories are ``executable'' (that is, searchable), too. Date: Wed, 2 Feb 2011 19:17:09 +0100 Message-Id: <1296670629-27711-1-git-send-email-thomas@schwinge.name> X-Mailer: git-send-email 1.7.1 X-Df-Sender: thomas@schwinge.name Cc: Thomas Schwinge X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2011 18:17:54 -0000 Signed-off-by: Thomas Schwinge --- 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