Advertisement
cantrepeat

pulllogs.sh

Apr 19th, 2019
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | None | 0 0
  1. #!/bin/bash
  2. #run in a bash shell to pull upgrade logs from dji mavic drone
  3. HOST_DIR=C:/adb/dji/logs/
  4. DEVICE_DIR=/data/dji/log/
  5. EXTENSION=".log"
  6. DATA="upgrade*"
  7.  
  8. for file in $(adb shell ls $DEVICE_DIR | grep $EXTENSION'$')
  9. do
  10.     file=$(echo -e $file | tr -d "\r\n"); # EOL fix
  11.     adb pull $DEVICE_DIR/$file $HOST_DIR/$file;
  12. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement