Tools: create an ardupilot entrypoint instead of hacking .bashrc on docker

This commit is contained in:
Pierre Kancir 2022-07-11 22:45:23 +02:00 committed by Peter Barker
parent ffc4910c7e
commit 99ef5f5957
1 changed files with 8 additions and 1 deletions

View File

@ -316,7 +316,8 @@ echo "Done!"
SHELL_LOGIN=".profile" SHELL_LOGIN=".profile"
if $IS_DOCKER; then if $IS_DOCKER; then
echo "Inside docker, we add the tools path into .bashrc directly" echo "Inside docker, we add the tools path into .bashrc directly"
SHELL_LOGIN=".bashrc" SHELL_LOGIN=".ardupilot_env"
echo "# ArduPilot env file. Need to be loaded by your Shell." > ~/$SHELL_LOGIN
fi fi
heading "Adding ArduPilot Tools to environment" heading "Adding ArduPilot Tools to environment"
@ -377,4 +378,10 @@ if [[ $SKIP_AP_GIT_CHECK -ne 1 ]]; then
echo "Done!" echo "Done!"
fi fi
fi fi
if $IS_DOCKER; then
echo "Finalizing ArduPilot env for Docker"
echo "source ~/.ardupilot_env">> ~/.bashrc
fi
echo "---------- $0 end ----------" echo "---------- $0 end ----------"