refactor: add bash script to read log file
This commit is contained in:
13
give_runs_log.sh
Normal file
13
give_runs_log.sh
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user