This commit is contained in:
@ -62,8 +62,8 @@ get_last_commit_hours() {
|
||||
local current_timestamp=$(date +%s)
|
||||
local diff_seconds=$((current_timestamp - last_commit_timestamp))
|
||||
|
||||
# Convert to hours with decimal precision
|
||||
local hours_ago=$(echo "scale=1; $diff_seconds / 3600" | bc)
|
||||
# Convert to hours with decimal precision using awk (more portable than bc)
|
||||
local hours_ago=$(awk "BEGIN {printf \"%.1f\", $diff_seconds / 3600}")
|
||||
|
||||
# Ensure leading zero for values less than 1
|
||||
if [[ $hours_ago =~ ^\. ]]; then
|
||||
|
Reference in New Issue
Block a user