#!/bin/sh
set -eu

PRE15_LIB_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/lib" && pwd -P)
export PRE15_LIB_DIR
. "$PRE15_LIB_DIR/runner.sh"
. "$PRE15_LIB_DIR/manifest.sh"

test "$#" -ge 1 || pre15_fail_usage 'usage: run-host.sh CASE [ARG ...]'
pre15_require_paths
pre15_host_case=$1
shift
pre15_host_script=$(pre15_find_case "$pre15_host_case")
pre15_run_command host "$pre15_host_case" "${PRE15_HOST_TIMEOUT:-240}" \
	/bin/sh "$pre15_host_script" "$@"
