docker_run respect PX4_DOCKER_REPO env variable

This commit is contained in:
Daniel Agar
2017-07-18 21:51:10 -04:00
parent aa9023b72e
commit b9c1d87876
+6 -1
View File
@@ -1,5 +1,7 @@
#! /bin/bash #! /bin/bash
if [ -z ${PX4_DOCKER_REPO+x} ]; then
echo "guessing PX4_DOCKER_REPO based on input";
if [[ $@ =~ .*px4fmu.* ]]; then if [[ $@ =~ .*px4fmu.* ]]; then
# nuttx-px4fmu-v{1,2,3,4,5} # nuttx-px4fmu-v{1,2,3,4,5}
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-07-27" PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-07-27"
@@ -20,9 +22,12 @@ elif [[ $@ =~ .*tests* ]]; then
# run all tests with simulation # run all tests with simulation
PX4_DOCKER_REPO="px4io/px4-dev-simulation:2017-07-27" PX4_DOCKER_REPO="px4io/px4-dev-simulation:2017-07-27"
fi fi
else
echo "PX4_DOCKER_REPO is set to '$PX4_DOCKER_REPO'";
fi
# otherwise default to nuttx # otherwise default to nuttx
if [ -z "$PX4_DOCKER_REPO" ]; then if [ -z ${PX4_DOCKER_REPO+x} ]; then
PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-07-27" PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2017-07-27"
fi fi