mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
scp_upload.sh: use ENV variable to set IP of RPi2
This commit is contained in:
+9
-1
@@ -5,6 +5,14 @@ if [[ "$#" < 2 ]]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
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..."
|
echo "Uploading..."
|
||||||
|
|
||||||
# Get last argument
|
# Get last argument
|
||||||
@@ -19,6 +27,6 @@ do
|
|||||||
fi
|
fi
|
||||||
# echo "Pushing $arg to $last"
|
# echo "Pushing $arg to $last"
|
||||||
#adb push $arg $last
|
#adb push $arg $last
|
||||||
scp $arg pi@px4autopilot:$last
|
scp $arg pi@$host:$last
|
||||||
((i+=1))
|
((i+=1))
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user