From 5b168203639f325c815bfcdae43fc404b5b8d4c3 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 31 Jan 2016 11:02:32 +1100 Subject: [PATCH] Added NetBSD support to getbirthday --- config/config | 2 +- fetch | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/config b/config/config index 12aecd61..384a1236 100644 --- a/config/config +++ b/config/config @@ -114,7 +114,7 @@ gtk3="on" # Whether to show a long pretty output # or a shortened one -# NOTE: Long pretty output doesn't work on OpenBSD. +# NOTE: Long pretty output doesn't work on OpenBSD or NetBSD. # --birthday_shorthand on/off birthday_shorthand="off" diff --git a/fetch b/fetch index 136a85df..b4fc2544 100755 --- a/fetch +++ b/fetch @@ -134,7 +134,7 @@ gtk3="on" # Whether to show a long pretty output # or a shortened one -# NOTE: Long pretty output doesn't work on OpenBSD. +# NOTE: Long pretty output doesn't work on OpenBSD or NetBSD. # --birthday_shorthand on/off birthday_shorthand="off" @@ -1214,6 +1214,11 @@ getbirthday () { date_cmd="$(date -j -f "%b %d %Y" "$birthday" "+%a %d %b %Y %l:%M %p")" ;; + "NetBSD") + birthday="$(ls -alctT /etc/defaults/rc.conf | awk '{printf $6 " " $7 " " $9 " " $8}')" + birthday_shorthand="on" + ;; + *) birthday="Unknown" ;;