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
c0fb89ce
Commit
c0fb89ce
authored
Jun 10, 2017
by
Muhammad Herdiansyah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Distro: Refactor $machine_arch
parent
04bdb702
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
neofetch
neofetch
+8
-3
No files found.
neofetch
View file @
c0fb89ce
...
@@ -216,8 +216,14 @@ get_distro() {
...
@@ -216,8 +216,14 @@ get_distro() {
[[
-z
"
$distro
"
]]
&&
distro
=
"
$os
(Unknown)"
[[
-z
"
$distro
"
]]
&&
distro
=
"
$os
(Unknown)"
# Get OS architecture.
# Get OS architecture.
[[
"
$os_arch
"
==
"on"
]]
&&
\
if
[[
"
$os_arch
"
==
"on"
]]
;
then
case
"
$os
"
in
"Solaris"
|
"AIX"
|
"BSD"
|
"macOS"
)
machine_arch
=
"
$(
uname
-p
)
"
;;
*
)
machine_arch
=
"
$(
uname
-m
)
"
;;
esac
distro+
=
"
${
machine_arch
}
"
distro+
=
"
${
machine_arch
}
"
fi
[[
"
${
ascii_distro
:-
auto
}
"
==
"auto"
]]
&&
\
[[
"
${
ascii_distro
:-
auto
}
"
==
"auto"
]]
&&
\
ascii_distro
=
"
$(
trim
"
$distro
"
)
"
ascii_distro
=
"
$(
trim
"
$distro
"
)
"
...
@@ -3772,11 +3778,10 @@ old_options() {
...
@@ -3772,11 +3778,10 @@ old_options() {
cache_uname
()
{
cache_uname
()
{
# Cache the output of uname so we don't
# Cache the output of uname so we don't
# have to spawn it multiple times.
# have to spawn it multiple times.
uname
=(
$(
uname
-sr
m
)
)
uname
=(
$(
uname
-sr
)
)
kernel_name
=
"
${
uname
[0]
}
"
kernel_name
=
"
${
uname
[0]
}
"
kernel_version
=
"
${
uname
[1]
}
"
kernel_version
=
"
${
uname
[1]
}
"
machine_arch
=
"
${
uname
[2]
}
"
}
}
convert_time
()
{
convert_time
()
{
...
...
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