Skip to content

Commit 46fb2cd

Browse files
authored
Install curl if not presented
1 parent 8918105 commit 46fb2cd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

benchmark-runner/scripts/run-benchmark.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,21 @@ 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+
# Run the install command you requested
137+
# Added DEBIAN_FRONTEND=noninteractive to prevent it from hanging on prompts
138+
export DEBIAN_FRONTEND=noninteractive
139+
apt-get update && apt-get install -y curl
140+
fi
141+
142+
# Verify and log the version (using head to just get the first line)
143+
echo "curl version: $(curl --version | head -n 1)"
144+
}
145+
131146
check_jbang() {
132147
if ! command -v jbang &> /dev/null; then
133148
log "jbang not found, installing..."
@@ -614,6 +629,9 @@ EOF
614629
# Create output directory
615630
mkdir -p "$OUTPUT_DIR"
616631

632+
# Check curl
633+
check_curl
634+
617635
# Check jbang
618636
check_jbang
619637

0 commit comments

Comments
 (0)