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
e4d7baec
Commit
e4d7baec
authored
Dec 28, 2016
by
Muhammad Herdiansyah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Distro: Apply suggestion
parent
2bad735f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
neofetch
neofetch
+6
-4
No files found.
neofetch
View file @
e4d7baec
...
@@ -54,7 +54,7 @@ get_distro() {
...
@@ -54,7 +54,7 @@ get_distro() {
case
"
$os
"
in
case
"
$os
"
in
"Linux"
|
"BSD"
|
"MINIX"
)
"Linux"
|
"BSD"
|
"MINIX"
)
if
[[
"
$(
< /proc/version
)
"
==
*
"Microsoft"
*
||
"
$(
< /proc/sys/kernel/osrelease
)
"
==
*
"Microsoft"
*
]]
;
then
## ERRORS NEED TO BE SUPPRESSED!
if
[[
"
$(
< /proc/version
)
"
==
*
"Microsoft"
*
||
"
$(
< /proc/sys/kernel/osrelease
)
"
==
*
"Microsoft"
*
]]
;
then
case
"
$distro_shorthand
"
in
case
"
$distro_shorthand
"
in
"on"
)
distro
=
"
$(
lsb_release
-sir
)
[Windows 10]"
;;
"on"
)
distro
=
"
$(
lsb_release
-sir
)
[Windows 10]"
;;
"tiny"
)
distro
=
"Windows 10"
;;
"tiny"
)
distro
=
"Windows 10"
;;
...
@@ -109,11 +109,13 @@ get_distro() {
...
@@ -109,11 +109,13 @@ get_distro() {
esac
esac
# Workarounds for distros that go against the os-release standard.
# Workarounds for distros that go against the os-release standard.
[[
-z
"
${
distro
//
}
"
]]
&&
distro
=
"
$(
awk
'/BLAG/ {print $1; exit}'
/etc/
*
ease /usr/lib/
*
ease
)
"
[[
-z
"
${
distro
//
}
"
]]
&&
distro
=
"
$(
awk
'/BLAG/ {print $1; exit}'
/etc/
os-release /usr/lib/os-rel
ease
)
"
[[
-z
"
${
distro
//
}
"
]]
&&
distro
=
"
$(
awk
-F
'='
'{print $2; exit}'
/etc/
*
ease /usr/lib/
*
ease
)
"
[[
-z
"
${
distro
//
}
"
]]
&&
distro
=
"
$(
awk
-F
'='
'{print $2; exit}'
/etc/
os-release /usr/lib/os-rel
ease
)
"
else
else
distro
=
"
$(
cat
/etc/
*
-release
)
"
# UUOC, but using usual bash $(< *-file) returns "ambiguous redirect"
for
release_file
in
/etc/
*
-release
;
do
distro+
=
"
$(
<
"
$release_file
"
)
"
done
if
[[
-z
"
$distro
"
]]
;
then
if
[[
-z
"
$distro
"
]]
;
then
case
"
$distro_shorthand
"
in
case
"
$distro_shorthand
"
in
"on"
|
"tiny"
)
distro
=
"
$kernel_name
"
;;
"on"
|
"tiny"
)
distro
=
"
$kernel_name
"
;;
...
...
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