PX4-Autopilot/Tools/adb_upload.sh
Julian Oes 994947ea84 Makefile/cmake/Tools: add easy Snapdragon upload
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.
2016-04-01 11:36:27 +02:00

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