mirror of
https://github.com/dylanaraps/pfetch.git
synced 2026-01-02 16:02:12 +01:00
pfetch: android support
This commit is contained in:
8
pfetch
8
pfetch
@@ -129,7 +129,7 @@ get_os() {
|
|||||||
|
|
||||||
case $os in
|
case $os in
|
||||||
Linux*)
|
Linux*)
|
||||||
# Some Linux disttributions (which are based on others)
|
# Some Linux distributions (which are based on others)
|
||||||
# fail to identify as they **do not** change the upstream
|
# fail to identify as they **do not** change the upstream
|
||||||
# distributions identification packages or files.
|
# distributions identification packages or files.
|
||||||
#
|
#
|
||||||
@@ -154,6 +154,12 @@ get_os() {
|
|||||||
if command -v lsb_release; then
|
if command -v lsb_release; then
|
||||||
distro=$(lsb_release -sd)
|
distro=$(lsb_release -sd)
|
||||||
|
|
||||||
|
# Android detection works by checking for the existence of
|
||||||
|
# the follow two directories. I don't think there's a simpler
|
||||||
|
# method than this.
|
||||||
|
elif [ -d /system/app ] && [ -d /system/priv-app ]; then
|
||||||
|
distro="Android $(getprop ro.build.version.release)"
|
||||||
|
|
||||||
else
|
else
|
||||||
# This used to be a simple '. /etc/os-release' but I believe
|
# This used to be a simple '. /etc/os-release' but I believe
|
||||||
# this is insecure as we blindly executed whatever was in the
|
# this is insecure as we blindly executed whatever was in the
|
||||||
|
|||||||
Reference in New Issue
Block a user