From ea7cebbf102ee73bc0cda72b2e3fc457cb5d6243 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Fri, 24 Jun 2016 19:41:43 +0200 Subject: [PATCH] scp_upload.sh: use ENV variable to set IP of RPi2 --- Tools/scp_upload.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Tools/scp_upload.sh b/Tools/scp_upload.sh index 37b2ce9898..2659af37cd 100755 --- a/Tools/scp_upload.sh +++ b/Tools/scp_upload.sh @@ -5,6 +5,14 @@ if [[ "$#" < 2 ]]; then exit fi +if [ -z ${AUTOPILOT_HOST+x} ]; then + host=px4autopilot + echo "\$AUTOPILOT_HOST is not set (use default: $host)" +else + host=$AUTOPILOT_HOST + echo "\$AUTOPILOT_HOST is set to $host" +fi + echo "Uploading..." # Get last argument @@ -19,6 +27,6 @@ do fi # echo "Pushing $arg to $last" #adb push $arg $last - scp $arg pi@px4autopilot:$last + scp $arg pi@$host:$last ((i+=1)) done