dbuild: run interactive shell by default

If not given any other args to run, just run an interactive shell.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
Message-Id: <20190909113140.9130-1-bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2019-09-09 14:31:40 +03:00
committed by Avi Kivity
parent 2543760ee6
commit 24c7320575

View File

@@ -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