#!/bin/bash BRANCH="9.0.1" 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 echo "Pausing 5 seconds... press CTRL+C to abort compilation" 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 make ATOMRCF405NAVI_DELUX