-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_result.sh
More file actions
executable file
·35 lines (26 loc) · 828 Bytes
/
Copy pathadd_result.sh
File metadata and controls
executable file
·35 lines (26 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# add_result.sh - Quickly add a new model result to a benchmark.
if [ "$#" -lt 3 ]; then
echo "Usage: ./add_result.sh <benchmark_id> <model_id> <path_to_index.html>"
exit 1
fi
BENCH_ID=$1
MODEL_ID=$2
FILE_PATH=$3
# Ensure benchmark exists
if [ ! -d "$BENCH_ID" ]; then
echo "Benchmark directory '$BENCH_ID' does not exist."
echo "Creating benchmark directory '$BENCH_ID'..."
mkdir -p "$BENCH_ID"
# Prompt user for prompt.txt content if first time
touch "$BENCH_ID/prompt.txt"
echo "Please add the prompt content to $BENCH_ID/prompt.txt"
fi
# Create model directory
mkdir -p "$BENCH_ID/$MODEL_ID"
# Copy index.html
cp "$FILE_PATH" "$BENCH_ID/$MODEL_ID/index.html"
echo "Added result to $BENCH_ID/$MODEL_ID/index.html"
# Run create_config.sh
bash create_config.sh
echo "Done!"