]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Set SHELL, if not already set, in order to
authorJim Meyering <jim@meyering.net>
Sun, 5 Mar 2006 17:28:42 +0000 (17:28 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 5 Mar 2006 17:28:42 +0000 (17:28 +0000)
avoid failure when `make check' is run through debuild;  dircolors
would fail due to lack of $SHELL.  Reported by Sven Joachim.

tests/help-version

index c96ca7e47c2e9298a533a08f5cba1228fee509fb..b3930626df373175b66a7088d336290d8b750048 100755 (executable)
@@ -4,6 +4,14 @@
 
 test "$VERBOSE" = yes && set -x
 
+# Ensure that $SHELL is set to *some* value.
+# This is required for dircolors, which would fail e.g., when
+# invoked via debuild (which removes SHELL from the environment).
+if test "x$SHELL" = x; then
+  SHELL=/bin/sh
+  export SHELL
+fi
+
 expected_failure_status_nohup=127
 expected_failure_status_printenv=2
 expected_failure_status_tty=3