mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-22 11:39:53 +00:00
Add windows support to getbirthday
This commit is contained in:
9
fetch
9
fetch
@@ -1195,11 +1195,18 @@ getbirthday () {
|
||||
date_cmd="$(date -d"$birthday" "+%a %d %b %Y %l:%M %p")"
|
||||
;;
|
||||
|
||||
"Mac OS X" | *"BSD")
|
||||
"Mac OS X")
|
||||
birthday="$(ls -alctT /var/log/CDIS.custom | tail -1 | awk '{printf $6 " " $7 " " $9 " " $8}')"
|
||||
date_cmd="$(date -j -f "%b %d %Y" "$birthday" "+%a %d %b %Y %l:%M %p")"
|
||||
;;
|
||||
|
||||
"Windows")
|
||||
birhday="$(cmd /K WMIC OS GET InstallDate)"
|
||||
birthday=${birthday/InstallDate }
|
||||
birthday=${birthday//[[:space:]]/ }
|
||||
date_cmd="$(date -d"$birthday" "+%a %d %b %Y %l:%M %p")"
|
||||
;;
|
||||
|
||||
*)
|
||||
birthday="Unknown"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user