-require_prog script
-#### FreeBSD script, e.g., doesn't use -c to identify a command to run.
-if script -c 'echo OK' /dev/null 2>&1 | egrep 'OK' >/dev/null; then
- script_command_opt='-c'
-else
- script_command_opt=''
-fi
-
-#### Run a command but don't wait for user input. script(1) seems to do
-#### what we want by not waiting when run in the background.
-run_without_input() {
- if [ "$script_command_opt" = -c ]; then
- #### -c takes single argument with command + arguments.
- script -c "$*" -f -q "$actual" >/dev/null &
- else
- #### E.g., FreeBSD. Don't combine command arguments.
- script -f -q "$actual" "$@" >/dev/null &
- fi
-
- wait $!
-}
-
-actual="$MH_TEST_DIR/test-version-check$$.actual"