2019-01-07 20:35:23 +03:00
|
|
|
#!/bin/bash -e
|
|
|
|
#
|
|
|
|
# Invokes provided arguments in a prebuilt docker image that contains
|
2019-02-03 01:29:56 +03:00
|
|
|
# the Inter toolchain.
|
2019-01-07 20:35:23 +03:00
|
|
|
#
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
RUN_ARGS=-it
|
|
|
|
if [[ "$1" == "--no-tty" ]]; then
|
|
|
|
RUN_ARGS=-i
|
|
|
|
shift
|
|
|
|
elif [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then
|
2019-02-03 01:29:56 +03:00
|
|
|
echo "Run Inter build environment virtual machine using docker." >&2
|
2019-01-07 20:35:23 +03:00
|
|
|
echo "usage: $0 [--no-tty] [<arg> ...]" >&2
|
|
|
|
echo "--no-tty Do not run with TTY input device emulation (useful for scripting)" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-02-03 01:29:56 +03:00
|
|
|
docker run --rm $RUN_ARGS -v "$PWD:/host" rsms/inter-build:latest "$@"
|