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
f8f50f6b
Commit
f8f50f6b
authored
Nov 01, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Distro: [Linux] Source /etc/*ease files
parent
a37a3eec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
17 deletions
+12
-17
neofetch
neofetch
+12
-17
No files found.
neofetch
View file @
f8f50f6b
...
@@ -160,26 +160,21 @@ getdistro() {
...
@@ -160,26 +160,21 @@ getdistro() {
distro
=
"Android
$(
getprop ro.build.version.release
)
"
distro
=
"Android
$(
getprop ro.build.version.release
)
"
else
else
# Workarounds are included in every shorthand option
case
"
$distro_shorthand
"
in
"on"
)
distro
=
"
$(
awk
-F
'='
'/^NAME|VERSION_ID=/ {print $2; exit}'
/etc/
*
ease /usr/lib/
*
ease
)
"
[
-z
"
$distro
"
]
&&
distro
=
"
$(
awk
-F
'='
'/^DISTRIB_ID|DISTRIB_RELEASE=/ {print $2}'
/etc/openwrt_release
)
"
;;
"tiny"
)
# Source the os-release file
distro
=
"
$(
awk
-F
'='
'/^NAME=/ {print $2; exit}'
/etc/
*
ease /usr/lib/
*
ease
)
"
for
file
in
/etc/
*
ease /usr/lib/
*
ease
;
do
[
-z
"
$distro
"
]
&&
distro
=
"
$(
awk
-F
'='
'/^TAILS_PRODUCT_NAME=/ {print $2}'
/etc/
*
ease
)
"
source
"
$file
"
2>/dev/null
[
-z
"
$distro
"
]
&&
distro
=
"
$(
awk
-F
'='
'/^DISTRIB_ID=/ {print $2}'
/etc/openwrt_release
)
"
done
;;
*
)
case
"
$distro_shorthand
"
in
distro
=
"
$(
awk
-F
'='
'/^PRETTY_NAME=/ {print $2; exit}'
/etc/
*
ease /usr/lib/
*
ease
)
"
"on"
)
distro
=
"
${
NAME
:-${
DISTRIB_ID
}}
${
VERSION_ID
:-${
DISTRIB_RELEASE
}}
"
;;
[
-z
"
$distro
"
]
&&
distro
=
"
$(
awk
-F
'='
'{print $2}'
/etc/
*
ease
)
"
"tiny"
)
distro
=
"
${
NAME
:-${
DISTRIB_ID
:-${
TAILS_PRODUCT_NAME
}}}
"
;;
[
-z
"
$distro
"
]
&&
distro
=
"
$(
awk
'/BLAG/ {print $1; exit}'
/etc/
*
ease
)
"
"off"
)
distro
=
"
${
PRETTY_NAME
:-${
DISTRIB_DESCRIPTION
}}
${
UBUNTU_CODENAME
}
"
;;
[
-z
"
$distro
"
]
&&
distro
=
"
$(
awk
-F
'='
'/^DISTRIB_DESCRIPTION=/ {print $2}'
/etc/openwrt_release
)
"
;;
esac
esac
# Workarounds for distros that go against the os-release standard.
[
-z
"
$distro
"
]
&&
distro
=
"
$(
awk
'/BLAG/ {print $1; exit}'
/etc/
*
ease
)
"
[
-z
"
$distro
"
]
&&
distro
=
"
$(
awk
-F
'='
'{print $2}'
/etc/
*
ease
)
"
fi
fi
distro
=
"
${
distro
//\
"}"
distro
=
"
${
distro
//\
"}"
distro=
"
${
distro
//\
'}"
distro=
"
${
distro
//\
'}"
...
...
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