mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-12 08:10:07 +00:00
Improve logic
This commit is contained in:
parent
ea2d02d08f
commit
421f506bf8
1 changed files with 8 additions and 9 deletions
|
@ -100,6 +100,14 @@ case $(uname) in
|
|||
Linux)
|
||||
OS='Linux'
|
||||
OS_ICON=$(print_icon 'LINUX_ICON')
|
||||
|
||||
# Check if we're running on Android
|
||||
case $(uname -o 2>/dev/null) in
|
||||
Android)
|
||||
OS='Android'
|
||||
OS_ICON=$(print_icon 'ANDROID_ICON')
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
SunOS)
|
||||
OS='Solaris'
|
||||
|
@ -111,15 +119,6 @@ case $(uname) in
|
|||
;;
|
||||
esac
|
||||
|
||||
# Not all OSes support the '-o' parameter
|
||||
# That's why this second condition is needed
|
||||
case $(uname -o 2>/dev/null) in
|
||||
Android)
|
||||
OS='Android'
|
||||
OS_ICON=$(print_icon 'ANDROID_ICON')
|
||||
;;
|
||||
esac
|
||||
|
||||
# Determine the correct sed parameter.
|
||||
#
|
||||
# `sed` is unfortunately not consistent across OSes when it comes to flags.
|
||||
|
|
Loading…
Reference in a new issue