aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_log
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-12-10 02:02:00 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-12-10 02:02:00 +0200
commit2e6dc8ada647ebe5de9c3361dfe809c119b85c8b (patch)
treea55d100f9bd97946b55a9acfa6e89b8398180e06 /lib/_ak_log
parentae385271b663cf385d832c7ccfb599347cd54b33 (diff)
downloadarching-kaos-tools-2e6dc8ada647ebe5de9c3361dfe809c119b85c8b.tar.gz
arching-kaos-tools-2e6dc8ada647ebe5de9c3361dfe809c119b85c8b.tar.bz2
arching-kaos-tools-2e6dc8ada647ebe5de9c3361dfe809c119b85c8b.zip
Bug fix for date program differences between linux and BSD
Diffstat (limited to 'lib/_ak_log')
-rwxr-xr-xlib/_ak_log2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_ak_log b/lib/_ak_log
index 7f832d8..a3ee259 100755
--- a/lib/_ak_log
+++ b/lib/_ak_log
@@ -8,7 +8,7 @@ _ak_log_print_log_line(){
messagetype="$(echo "$*" | awk '{print $3}')"
message="$(echo "$*" | cut -d ' ' -f4-)"
printf '%s \033[1;32m%s\033[0;00m \033[1;31m%s\033[0;00m %s\n' \
- "$(date --date=@$timestamp +%Y%m%d_%H%M%S)" \
+ "$(date --date=@$timestamp +%Y%m%d_%H%M%S 2>/dev/null || date -r $timestamp +%Y%m%d_%H%M%S 2>/dev/null)" \
"$program" \
"$messagetype" \
"$message"