From c5db5b4417c2978dfcf79640c382f66ed26d2147 Mon Sep 17 00:00:00 2001 From: appel_c Date: Tue, 23 Sep 2025 22:36:19 -0500 Subject: [PATCH] refactor: add bash script to read log file --- give_runs_log.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 give_runs_log.sh diff --git a/give_runs_log.sh b/give_runs_log.sh new file mode 100644 index 0000000..6e1060d --- /dev/null +++ b/give_runs_log.sh @@ -0,0 +1,13 @@ +#!/bin/bash +log_file="$1" +if [ -f "$log_file" ]; then + head -n -1 "$log_file" + exit_code=$(tail -n 1 "$log_file") + if [[ "$exit_code" == "Exit Code: 0" ]]; then + exit 0 + else + exit 1 + fi +else + exit 1 +fi \ No newline at end of file