Skip to content

Commit

Permalink
condition interactive prompt needs
Browse files Browse the repository at this point in the history
  • Loading branch information
tfoote committed Jan 1, 2024
1 parent 74eac48 commit 50c65a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ SCRIPT_DIR=`dirname $( readlink -m $( type -p $0 ))`
# ./run.sh make build

COMMAND=''
INTERACTIVE='-it'
if [ -z "$1" ]
then
COMMAND="bash"
else
COMMAND=$@
INTERACTIVE=''
fi

docker run \
-w /home/`whoami`/rosindex \
-v $SCRIPT_DIR/..:/home/`whoami`/rosindex:rw \
--net=host -ti rosindex/rosindex $COMMAND
--net=host $INTERACTIVE rosindex/rosindex $COMMAND

0 comments on commit 50c65a4

Please sign in to comment.