From 2436335f9b8a1b1bc4a2eb1b738f4a52a454c29e Mon Sep 17 00:00:00 2001
From: Dario Nieuwenhuis <dirbaio@dirbaio.net>
Date: Wed, 24 Jul 2024 17:17:04 +0200
Subject: [PATCH] ci: add instructions to install cargo-batch if not installed.

---
 ci.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ci.sh b/ci.sh
index 15bb6eec0..341fe6a09 100755
--- a/ci.sh
+++ b/ci.sh
@@ -2,6 +2,14 @@
 
 set -eo pipefail
 
+if ! command -v cargo-batch &> /dev/null; then
+    echo "cargo-batch could not be found. Install it with the following command:"
+    echo ""
+    echo "    cargo install --git https://github.com/embassy-rs/cargo-batch cargo --bin cargo-batch --locked"
+    echo ""
+    exit 1
+fi
+
 # check-cfg is stable on rustc 1.79 but not cargo 1.79.
 # however, our cargo-batch is currently based on cargo 1.80, which does support check-cfg.
 # so, force build.rs scripts to emit check-cfg commands.