scripts: more "export VAR=VALUE" fixes
authorJunio C Hamano <gitster@pobox.com>
Fri, 23 May 2014 18:19:34 +0000 (11:19 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 23 May 2014 22:32:54 +0000 (15:32 -0700)
Found by

    git grep '[^-]export [^&]*=' -- \*.sh

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3032-merge-recursive-options.sh
t/t5560-http-backend-noserver.sh

index 5fd7bbb..4029c9c 100755 (executable)
@@ -14,7 +14,11 @@ test_description='merge-recursive options
 . ./test-lib.sh
 
 test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
-test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
+if test_have_prereq GREP_STRIPS_CR
+then
+       GREP_OPTIONS=-U
+       export GREP_OPTIONS
+fi
 
 test_expect_success 'setup' '
        conflict_hunks () {
index 9be9ae3..1e25128 100755 (executable)
@@ -5,7 +5,11 @@ test_description='test git-http-backend-noserver'
 
 HTTPD_DOCUMENT_ROOT_PATH="$TRASH_DIRECTORY"
 
-test_have_prereq GREP_STRIPS_CR && export GREP_OPTIONS=-U
+if test_have_prereq GREP_STRIPS_CR
+then
+       GREP_OPTIONS=-U
+       export GREP_OPTIONS
+fi
 
 run_backend() {
        echo "$2" |