build-wing 529 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. BRANCH="8.0.1"
  3. rm -rf inav && echo "Cleaning up..."
  4. git clone -b $BRANCH --single-branch https://github.com/iNavFlight/inav.git && echo "Latest code fetched succesfully"
  5. diff -crB inav patch/inav > custom.patch
  6. patch -p1 --dry-run < custom.patch
  7. read -p "Do you want to continue? (y/n)" -n 1 -r
  8. echo
  9. if [[ $REPLY =~ ^[Yy]$ ]]
  10. then
  11. patch -p1 < custom.patch
  12. rm custom.patch
  13. mkdir inav/build
  14. cd inav/build
  15. sleep 3
  16. echo "This might take a while. Go have a pizza or something!"
  17. cmake ..
  18. make IFLIGHT_BLITZ_F722
  19. fi
  20. exit 0