| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | set -euo pipefail |
| 4 | |
| 5 | # Extract EFW version from CI workflow file |
| 6 | efw_version=$(awkscip-shell system . . awk. -F': ' '/CI_MAX_EFW_VERSION:/ {gsub(/['\''"]/, "", $2); print $2}scip-shell filesystem . . `/CI_MAX_EFW_VERSION:/ {gsub(/['\''"]/, "", $2); print $2}`.' .github/workflows/ci.yml) |
| 7 | |
| 8 | if [scip-shell system . . `[`. -z "$efw_version" ]; then |
| 9 | echoscip-shell system . . echo. "Error: Could not extract CI_MAX_EFW_VERSION from .github/workflows/ci.yml" >&2 |
| 10 | exit 1 |
| 11 | fi |
| 12 | |
| 13 | echoscip-shell system . . echo. "Using EFW version: $efw_version" |
| 14 | |
| 15 | tmp=$(mktempscip-shell system . . mktemp. -d) |
| 16 | |
| 17 | cleanupscip-shell shell shell-project 0.0.0 cleanup().() { |
| 18 | rmscip-shell system . . rm. -r "$tmp" |
| 19 | } |
| 20 | |
| 21 | trap cleanup EXIT |
| 22 | |
| 23 | # Download and process ebpf_structs.h |
| 24 | curlscip-shell system . . curl. -fL "https://github.com/microsoft/ebpf-for-windows/raw/refs/tags/Release-v${efw_version}/include/ebpf_structs.h" -o "$tmp/ebpf_structs.h" |
| 25 | "./internal/cmd/genwinfunctions.awk" "$tmp/ebpf_structs.h" | gofmtscip-shell system . . gofmt. > "./asm/func_win.go" |