-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate-report.sh
More file actions
executable file
·52 lines (45 loc) · 1.4 KB
/
generate-report.sh
File metadata and controls
executable file
·52 lines (45 loc) · 1.4 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/utils/utils.sh"
# Function to display help
show_help() {
echo "Usage: $0 [OPTIONS]"
echo "Options:"
echo " -f, --format FORMAT Output format (md, typst, tex). Default: md"
echo " -r, --rootDir PATH Root directory of the result files. Default: ."
echo " -h, --help Display this help message"
}
# Default output format
output_format="md"
root_dir="."
# Parse command-line options
while [[ $# -gt 0 ]]; do
case $1 in
-f|--format)
output_format="$2"
shift 2
;;
-r|--rootDir)
root_dir="$2"
shift 2
;;
-h|--help)
show_help
exit 0
;;
*)
echo "Unknown option: $1"
show_help
exit 1
;;
esac
done
# Validate output format
if [[ ! "$output_format" =~ ^(md|typst|tex)$ ]]; then
echo "Error: Invalid output format. Use md, typst, or tex."
exit 1
fi
print_banner "Ada Benchmark Repository: Generate Report"
# Run the command with the specified output format
deno run --allow-all $SCRIPT_DIR/utils/cogralys-bench-util.ts generate-report --rootDir "$root_dir" -o "$output_format"
deno run --allow-all $SCRIPT_DIR/utils/cogralys-bench-util.ts generate-import-report --rootDir "$root_dir" -o "$output_format"