From 33c8a232c72ad34d4af8ed1335ddebb5c34cd716 Mon Sep 17 00:00:00 2001 From: jon brookes Date: Wed, 16 Jul 2025 17:45:29 +0100 Subject: [PATCH] added dev preflight check --- scripts/dev-pre-flight-checks.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/dev-pre-flight-checks.sh diff --git a/scripts/dev-pre-flight-checks.sh b/scripts/dev-pre-flight-checks.sh new file mode 100755 index 0000000..4523443 --- /dev/null +++ b/scripts/dev-pre-flight-checks.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +required_tools=("infctl" "pwgen" "kubectl" "k3d" "helm" "jq" "docker") + +MISSING=false +check_required_tools() { + for tool in "${required_tools[@]}"; do + if ! command -v "$tool" &> /dev/null; then + echo "Error: $tool is not installed. Please install it to continue." + MISSING=true + fi + done +} + +check_required_tools + +if [ "$MISSING" = true ]; then + echo "Pre-flight checks failed. Please install the missing tools and try again." + exit 1 +else + echo "Pre-flight checks have passed." +fi +