#!/usr/bin/bash -xe # generate the source cd upstream/rust git checkout . rm -rf mcore/ ../../generate.expect cd ../.. # patch up rm -rf src/ mv upstream/rust/mcore/src . sd -s '//#![no_std]' '#![no_std]' src/lib.rs rm src/main.rs # cleanup upstream again cd upstream/rust git checkout . rm -rf mcore/ cd ../.. # check cargo check --target thumbv7em-none-eabi