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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user