diff --git a/tools/toolchain/dbuild b/tools/toolchain/dbuild index 24a8f05bef..fc8847c3ba 100755 --- a/tools/toolchain/dbuild +++ b/tools/toolchain/dbuild @@ -11,7 +11,10 @@ done interactive= -if [[ "$1" = -* ]]; then +if [[ $# -eq 0 ]]; then + interactive=y + docker_args=(-it) +elif [[ "$1" = -* ]]; then while [[ "$1" != "--" && $# != 0 ]]; do case "$1" in --*) @@ -37,6 +40,12 @@ if [[ "$1" = -* ]]; then shift fi +if [[ $# != 0 ]]; then + args=("$@") +else + args=(/bin/bash -i) +fi + MAVEN_LOCAL_REPO="$HOME/.m2" mkdir -p "$MAVEN_LOCAL_REPO" @@ -56,7 +65,7 @@ docker_common_args=( -w "$PWD" \ "${docker_args[@]}" \ "$(<"$here/image")" \ - "$@" + "${args[@]}" ) if [[ -n "$interactive" ]]; then