gen-helper script: bail on failure

This commit is contained in:
Robin Müller 2024-06-11 14:06:14 +02:00
parent 9ed161ffd8
commit d10086ee71
2 changed files with 6 additions and 1 deletions

View File

@ -16,6 +16,11 @@ if [ -x "$(${svd2rust_bin} --version)" ]; then
exit exit
fi fi
${svd2rust_bin} -i svd/va416xx-base.svd ${svd2rust_bin} -i svd/va416xx-base.svd
result=$?
if [ $result -ne 0 ]; then
echo "svd2rust failed with code $result"
exit
fi
rm -rf src rm -rf src
form -i lib.rs -o src/ && rm lib.rs form -i lib.rs -o src/ && rm lib.rs
cargo fmt cargo fmt