Skip to content

Commit b37f200

Browse files
committed
Install curl if not presented
1 parent 8918105 commit b37f200

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

benchmark-runner/scripts/run-benchmark.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,20 @@ validate_config() {
128128
log " Measurement window: $((total_secs - warmup_secs))s"
129129
}
130130

131+
check_curl() {
132+
# Check if curl is present
133+
if ! command -v curl &> /dev/null; then
134+
echo "curl not found, installing..."
135+
136+
# Added DEBIAN_FRONTEND=noninteractive to prevent it from hanging on prompts
137+
export DEBIAN_FRONTEND=noninteractive
138+
apt-get update && apt-get install -y curl
139+
fi
140+
141+
# Verify and log the version (using head to just get the first line)
142+
echo "curl version: $(curl --version | head -n 1)"
143+
}
144+
131145
check_jbang() {
132146
if ! command -v jbang &> /dev/null; then
133147
log "jbang not found, installing..."
@@ -614,6 +628,9 @@ EOF
614628
# Create output directory
615629
mkdir -p "$OUTPUT_DIR"
616630

631+
# Check curl
632+
check_curl
633+
617634
# Check jbang
618635
check_jbang
619636

0 commit comments

Comments
 (0)