Skip to content
Snippets Groups Projects
Commit 61a7846c authored by Yorhel's avatar Yorhel
Browse files

config: Use /bin/sh as default shell and don't check for its existence

/bin/bash is not available on every system, nor always the default.
/bin/sh is standardised, but not always the preferred interactive shell,
hence it's configurable.

There's no need to check for the existence of this shell during config,
since it's an option that only affects run-time - and you may compile
ncdu on a totally different system than you would run it on.
parent 777db9a5
No related branches found
No related tags found
No related merge requests found
......@@ -58,14 +58,10 @@ fi
# Configure default shell for spawning shell when $SHELL is not set
AC_ARG_WITH([shell],
[AS_HELP_STRING([--with-shell],
[used interpreter as default shell (default is /bin/bash)])],
[used interpreter as default shell (default is /bin/sh)])],
[DEFAULT_SHELL=$withval],
[DEFAULT_SHELL=/bin/bash])
[DEFAULT_SHELL=/bin/sh])
AC_MSG_NOTICE([Using $DEFAULT_SHELL as the default shell if \$SHELL is not set])
AC_CHECK_PROG(TEST_SHELL, $DEFAULT_SHELL, yes, no, [/])
if test "x$TEST_SHELL" != "xyes"; then
AC_MSG_ERROR([Default shell interpreter $DEFAULT_SHELL not found])
fi
AC_DEFINE_UNQUOTED(DEFAULT_SHELL, "$DEFAULT_SHELL", [Used default shell interpreter])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment