mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
b1527d5581
* fixes verbosity option when set through command line * adds support for build type and allows to run gdb in container * adds missing toolchain headers to project * renames container macros * adds gdbserver * fixes verbosity option when set through command line * adds support for build type and allows to run gdb in container * adds missing toolchain headers to project * renames container macros * adds gdbserver * removes language settings, which contains alternating values * adds wrapper script to launch gdbserver * fix docker command in wrapper script * fixes run in dind setup * replaces docker's init through dump-init
37 lines
775 B
Bash
37 lines
775 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
PROJECT_ROOT="${PROJECT_ROOT:-%PROJECT_ROOT%}"
|
|
|
|
DOCKER="${DOCKER:-%DOCKER%}"
|
|
IMAGE="${IMAGE:-%IMAGE%}"
|
|
NETWORK="${NETWORK:-host}"
|
|
HOST_CONTAINER="${HOST_CONTAINER:-"$("$PROJECT_ROOT/build/get_container_id.sh")"}"
|
|
|
|
# shellcheck disable=SC2162
|
|
read -a ADDITIONAL_RUNFLAGS <<< "$RUNFLAGS"
|
|
|
|
RUNFLAGS=()
|
|
|
|
# shellcheck disable=SC2191
|
|
RUNFLAGS+=( %RUNFLAGS% )
|
|
|
|
if [[ -n "$HOST_CONTAINER" ]]; then
|
|
RUNFLAGS+=( --volumes-from "$HOST_CONTAINER" )
|
|
fi
|
|
|
|
RUNFLAGS+=( --network "$NETWORK" )
|
|
|
|
if [[ -n "$CONTAINER_CGROUP_PARENT" ]]; then
|
|
RUNFLAGS+=( --cgroup-parent "$CONTAINER_CGROUP_PARENT" )
|
|
fi
|
|
|
|
RUNFLAGS+=( --workdir "$PWD" )
|
|
|
|
RUNCMD=( %RUNCMD% )
|
|
|
|
set -- "${RUNFLAGS[@]}" "${ADDITIONAL_RUNFLAGS[@]}" "$IMAGE" "${RUNCMD[@]}" "$@"
|
|
|
|
exec "$DOCKER" run "$@"
|