forked from Archive/PX4-Autopilot
scp_upload.sh: use ENV variable to set IP of RPi2
This commit is contained in:
parent
4c0ed8bdd5
commit
ea7cebbf10
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue