Added birthday support to BSD

This commit is contained in:
Dylan 2016-01-31 10:31:29 +11:00
parent ee4353d07b
commit 19be922cb9
2 changed files with 7 additions and 2 deletions

2
1.1.md
View File

@ -59,7 +59,7 @@ systems it isn't packaged for yet!
**Birthday:** **Birthday:**
- Added `birthday` which prints the age of tyour OS - Added `birthday` which prints the age of your OS
- Added `--birthday_shorthand` and `$birthday_shorthand` to shorten/lengthen<br \> - Added `--birthday_shorthand` and `$birthday_shorthand` to shorten/lengthen<br \>
the output of birthday. the output of birthday.
- Added `--birthday_time` and `$birthday_time` to show/hide the time in the output. - Added `--birthday_time` and `$birthday_time` to show/hide the time in the output.

7
fetch
View File

@ -1197,7 +1197,12 @@ getbirthday () {
;; ;;
"Mac OS X") "Mac OS X")
birthday="$(ls -alctT /var/log/CDIS.custom | tail -1 | awk '{printf $6 " " $7 " " $9 " " $8}')" birthday="$(ls -alctT /var/log/CDIS.custom | awk '{printf $6 " " $7 " " $9 " " $8}')"
date_cmd="$(date -j -f "%b %d %Y" "$birthday" "+%a %d %b %Y %l:%M %p")"
;;
*"BSD")
birthday="$(ls -alctT /etc/hostid | awk '{printf $6 " " $7 " " $9 " " $8}')"
date_cmd="$(date -j -f "%b %d %Y" "$birthday" "+%a %d %b %Y %l:%M %p")" date_cmd="$(date -j -f "%b %d %Y" "$birthday" "+%a %d %b %Y %l:%M %p")"
;; ;;