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