Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
14610a99
Commit
14610a99
authored
Dec 16, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Birthday: Merge macOS with BSD
parent
708beb17
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
21 deletions
+26
-21
neofetch
neofetch
+26
-21
No files found.
neofetch
View file @
14610a99
...
@@ -1736,20 +1736,26 @@ get_birthday() {
...
@@ -1736,20 +1736,26 @@ get_birthday() {
birthday="
$(
ls
-lUT
/var/log/install.log |
awk
'{printf $6 " " $7 " " $9 " " $8}'
)
"
birthday="
$(
ls
-lUT
/var/log/install.log |
awk
'{printf $6 " " $7 " " $9 " " $8}'
)
"
;;
;;
"
BSD
")
"
BSD
"
| "
Mac OS X
"
)
case "
$kernel_name
" in
case "
$kernel_name
" in
"
Darwin
")
birthday_file="
/var/log/install.log
"
;;
"
OpenBSD
"* | "
Bitrig
"*)
"
OpenBSD
"* | "
Bitrig
"*)
birthday
="
$(
ls
-alctT
/ |
awk
'/lost\+found/ {printf $6 " " $7 " " $9 " " $8}'
)
"
birthday
_file="
/
"
;;
;;
"
FreeBSD
"*)
"
FreeBSD
"*)
birthday
="
$(
ls
-alctT
/etc/hostid |
awk
'{printf $6 " " $7 " " $9 " " $8}'
)
"
birthday
_file="
/etc/hostid
"
;;
;;
"
NetBSD
"* | "
DragonFly
"*)
"
NetBSD
"* | "
DragonFly
"*)
birthday
="
$(
ls
-alctT
/etc/defaults/rc.conf |
awk
'{printf $6 " " $7 " " $9 " " $8}'
)
"
birthday
_file="
/etc/defaults/rc.conf
"
;;
;;
esac
esac
birthday="
$(
ls
-alctT
"
$birthday_file
"
|
awk
'{printf $6 " " $7 " " $9 " " $8}'
)
"
;;
;;
"
Windows
")
"
Windows
")
...
@@ -1765,8 +1771,8 @@ get_birthday() {
...
@@ -1765,8 +1771,8 @@ get_birthday() {
;;
;;
esac
esac
birthday="
${
birthday
%\.*
}
"
birthday="
${
birthday
//-/
}
"
birthday="
${
birthday
//-/
}
"
birthday="
${
birthday
%
:
*
}
"
birthday=(
$birthday
)
birthday=(
$birthday
)
birthday="
$(
convert_time
"
${
birthday
[@]
}
"
)
"
birthday="
$(
convert_time
"
${
birthday
[@]
}
"
)
"
}
}
...
@@ -2919,25 +2925,24 @@ convert_time() {
...
@@ -2919,25 +2925,24 @@ convert_time() {
year
=
"
$1
"
year
=
"
$1
"
day
=
"
$3
"
day
=
"
$3
"
# Split time into hours/minutesr
# Split time into hours/minutes
time
=
"
${
4
%\
:
*
}
"
hour
=
"
${
4
/
:
*
}
"
hour
=
"
${
time
/
:
*
}
"
min
=
"
${
4
/
${
hour
}}
"
min
=
"
${
time
/
${
hour
}}
"
# Get month. (Month code is used for day of week)
# Get month. (Month code is used for day of week)
case
"
$2
"
in
case
"
$2
"
in
1
)
month
=
"Jan"
;
month_code
=
"0"
;;
1
|
"Jan"
)
month
=
"Jan"
;
month_code
=
"0"
;;
2
)
month
=
"Feb"
;
month_code
=
"3"
;;
2
|
"Feb"
)
month
=
"Feb"
;
month_code
=
"3"
;;
3
)
month
=
"Mar"
;
month_code
=
"3"
;;
3
|
"Mar"
)
month
=
"Mar"
;
month_code
=
"3"
;;
4
)
month
=
"Apr"
;
month_code
=
"6"
;;
4
|
"Apr"
)
month
=
"Apr"
;
month_code
=
"6"
;;
5
)
month
=
"May"
;
month_code
=
"1"
;;
5
|
"May"
)
month
=
"May"
;
month_code
=
"1"
;;
6
)
month
=
"Jun"
;
month_code
=
"4"
;;
6
|
"Jun"
)
month
=
"Jun"
;
month_code
=
"4"
;;
7
)
month
=
"Jul"
;
month_code
=
"6"
;;
7
|
"Jul"
)
month
=
"Jul"
;
month_code
=
"6"
;;
8
)
month
=
"Aug"
;
month_code
=
"2"
;;
8
|
"Aug"
)
month
=
"Aug"
;
month_code
=
"2"
;;
9
)
month
=
"Sep"
;
month_code
=
"5"
;;
9
|
"Sep"
)
month
=
"Sep"
;
month_code
=
"5"
;;
10
)
month
=
"Oct"
;
month_code
=
"0"
;;
10
|
"Oct"
)
month
=
"Oct"
;
month_code
=
"0"
;;
11
)
month
=
"Nov"
;
month_code
=
"3"
;;
11
|
"Nov"
)
month
=
"Nov"
;
month_code
=
"3"
;;
12
)
month
=
"Dec"
;
month_code
=
"5"
;;
12
|
"Dec"
)
month
=
"Dec"
;
month_code
=
"5"
;;
esac
esac
# Get leap year.
# Get leap year.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment