mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
This adds a a target `make eagle_default` to build both the POSIX and the QURT side in one command. Also, it adds an upload target for both to push the files over adb to the device. This doesn't just push the executables and lib files, but also the startup config files.
26 lines
389 B
Bash
Executable File
26 lines
389 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ "$#" < 2 ]]; then
|
|
echo "usage: adb_upload.sh SRC1 [SRC2 ...] DEST"
|
|
exit
|
|
fi
|
|
|
|
echo "Wait for device..."
|
|
adb wait-for-device
|
|
echo "Uploading..."
|
|
|
|
# Get last argument
|
|
for last; do true; done
|
|
|
|
# Go through source files and push them one by one.
|
|
i=0
|
|
for arg
|
|
do
|
|
if [[ $((i+1)) == "$#" ]]; then
|
|
break
|
|
fi
|
|
# echo "Pushing $arg to $last"
|
|
adb push $arg $last
|
|
((i+=1))
|
|
done
|