]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
If the $DJDIR envvar is defined, set SHELL
authorJim Meyering <jim@meyering.net>
Sun, 18 Mar 2001 16:53:58 +0000 (16:53 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 18 Mar 2001 16:53:58 +0000 (16:53 +0000)
to $DJDIR/bin/bash.exe.  Patch from Richard Dawe, based on a
suggestion from Eli Zaretskii.

tests/Fetish.pm

index 9c93947bf1114c1509e7574af2242ff7874be445..4dffeec1fb0332737e24dff4b52004d6ada00b8f 100644 (file)
@@ -12,7 +12,7 @@ use FileHandle;
 use File::Compare qw(compare);
 
 @ISA = qw(Exporter);
-($VERSION = '$Revision: 1.9 $ ') =~ tr/[0-9].//cd;
+($VERSION = '$Revision: 1.10 $ ') =~ tr/[0-9].//cd;
 @EXPORT = qw (run_tests);
 
 my $debug = $ENV{DEBUG};
@@ -23,6 +23,12 @@ my %Zero_one_type = map {$_ => 1} qw (OUT ERR EXIT PRE POST);
 my $srcdir = $ENV{srcdir};
 my $Global_count = 1;
 
+# When running in a DJGPP environment, make $ENV{SHELL} point to bash.
+# Otherwise, a bad shell might be used (e.g. command.com) and many
+# tests would fail.
+defined $ENV{DJDIR}
+  and $ENV{SHELL} = "$ENV{DJDIR}/bin/bash.exe";
+
 # A file spec: a scalar or a reference to a single-keyed hash
 # ================
 # 'contents'               contents only (file name is derived from test name)