]> git.notmuchmail.org Git - notmuch/commitdiff
test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portability
authorJoel Borggrén-Franck <jbf@codehouse.se>
Wed, 1 Dec 2010 20:27:52 +0000 (21:27 +0100)
committerCarl Worth <cworth@cworth.org>
Fri, 27 May 2011 21:03:28 +0000 (14:03 -0700)
Change #!/bin/bash at start of tests to "#!/usr/bin/env bash". That way
systems running on bash < 4 can prepend bash >= 4 to path before
running the tests.

23 files changed:
test/README
test/aggregate-results.sh
test/author-order
test/basic
test/dump-restore
test/emacs
test/encoding
test/from-guessing
test/json
test/long-id
test/maildir-sync
test/new
test/notmuch-test
test/raw
test/reply
test/search
test/search-output
test/test-lib.sh
test/test-verbose
test/thread-naming
test/thread-order
test/uuencode
test/valgrind/valgrind.sh

index ebaa3cfd2c732dde689ee6055883dabca54ab598..07da480be5f758a2b043d7ce6c1b44b25486c466 100644 (file)
@@ -68,11 +68,11 @@ remaining tests to be unaffected.
 
 Writing Tests
 -------------
-The test script is written as a shell script.  It should start
-with the standard "#!/bin/bash" with copyright notices, and an
+The test script is written as a shell script.  It should start with
+the standard "#!/usr/bin/env bash" with copyright notices, and an
 assignment to variable 'test_description', like this:
 
-       #!/bin/bash
+       #!/usr/bin/env bash
        #
        # Copyright (c) 2005 Junio C Hamano
        #
index 0f1ea332b3e8b7800e644851cfdcce6b7c258d45..732d6ca7f53ca8bf332f1179199ec132fe6abe04 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 fixed=0
 success=0
index d11499224d0729c2edf8e85312a6832a18e79ff1..6ffeffc719476630c21055dc978d7d934df371c8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="author reordering;"
 . ./test-lib.sh
 
index 13e02258de83e8bf6529523c821e2da6222afffc..a8d1f1d21800dcac97e888781fdcb04c94f234be 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # Copyright (c) 2005 Junio C Hamano
 #
index 0d78f014bb41977ab63d2b1d394766e7784ed8a6..a4de3706c510d23fe033cd69b5d5c0bf12155343 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="\"notmuch dump\" and \"notmuch restore\""
 . ./test-lib.sh
 
index e2dfa9ab9b5ac84b13aef5e6681c40d07a30e2b0..bfa054fca36313242c41068a5309f5a74c6f9e8f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="emacs interface"
 . test-lib.sh
 
index 68cb8ee840d7b8f3ed8b4dc8b0c1bc951956b91d..673b0394860548a379b58733dba2823aa93cec9f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="encoding issues"
 . ./test-lib.sh
 
index 6744e6870e607b173e03e839ad0ad3f5eebdcaf7..d8727bbfd2ee8048c65e379c78b5ed2fc0141aac 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="From line heuristics (with multiple configured addresses)"
 . ./test-lib.sh
 
index 307cd1e6c927e3c655b273076c55e5ec436d2d06..7c81856321326b0969a5d61d3e20b23b2760e7f8 100755 (executable)
--- a/test/json
+++ b/test/json
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="--format=json output"
 . ./test-lib.sh
 
index 84f92943595a6a20a52587a25a0b863178710582..85e620fadd404f8c3ffaf4e4316f4f469e0fb943 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="messages with ridiculously-long message IDs"
 . ./test-lib.sh
 
index 50a5b8e617b17a59a66ca4a1356e550c1736d7b1..2b43127e9e74ed62f87f00829630384eb284b520 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 test_description="maildir synchronization"
 
index 7b396ae4eae2c72ef582b03a318cca2c85cc4484..1b7296e89a2e08a22d6a78603096a6e8d582d921 100755 (executable)
--- a/test/new
+++ b/test/new
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description='"notmuch new" in several variations'
 . ./test-lib.sh
 
index 0ea4f4f732534ca68be1430c7cebd131a032beaf..c81e3fc037301a328f0395b20dfa470ce5935dc9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Run tests
 #
index 4ed237c141ccc3fe2baf2db511a27985b7a382a0..b7e265a80da79fd66a69498e95b8cea4168a0071 100755 (executable)
--- a/test/raw
+++ b/test/raw
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr//bin/env bash
 
 test_description='notmuch show --format=raw'
 . ./test-lib.sh
index 99c337607ec9152720135aa82471fa7804d495bc..c0b8e261e638f5b40ee5c7433f8519e65c6218d1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="\"notmuch reply\" in several variations"
 . ./test-lib.sh
 
index b180c7ff42a3c688dae3f80b2501c43ee65d1799..2085fe666f24a7d27d2cf27c981aa40688bc3a8a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description='"notmuch search" in several variations'
 . ./test-lib.sh
 
index b4149931543d8ead9317f9b55387264c0e2503dc..ef870bf79cdd0467f1c3625d07cda4b1381da5fe 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description='various settings for "notmuch search --output="'
 . ./test-lib.sh
 
index 533d15b5e8388d5b03652aab9b624123f36c4526..7fed29ccaa21128258e33fd4626d474f6f56decc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # Copyright (c) 2005 Junio C Hamano
 #
index f29a9c7d655e106d5d500e4f27b18bc5e5528c41..4100c05149f1718896b5ec916111d684979358ce 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 test_description='the verbosity options of the test framework itself.'
 
index bcc3d610b8bf6b977dea138632b3d490550fcea5..41b97d9c082659ed8aa154d86f864b435633859d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="naming of threads with changing subject"
 . ./test-lib.sh
 
index 1819fce32f8260cbef5e1618c6e85d802bb2017a..6c3a4b3f70a2b85124075e8696fc72ef061f2a12 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="threading when messages received out of order"
 . ./test-lib.sh
 
index d5093209056f732f8f15b774055ff9efea5ad733..d0d16bdd224ff6a14101ecc4ed4d31a5267ce3bc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 test_description="handling of uuencoded data"
 . ./test-lib.sh
 
index 3bc90f5cd178fa9686605797f8fe1baea78c3727..78700c077e836c8569fd1b96bb5c3abf1e5fd26c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 base=$(basename "$0")