Improve logic

This commit is contained in:
guixxx 2017-04-12 18:39:10 -03:00 committed by Ben Hilburn
parent ea2d02d08f
commit 421f506bf8

View file

@ -100,6 +100,14 @@ case $(uname) in
Linux) Linux)
OS='Linux' OS='Linux'
OS_ICON=$(print_icon 'LINUX_ICON') 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) SunOS)
OS='Solaris' OS='Solaris'
@ -111,15 +119,6 @@ case $(uname) in
;; ;;
esac 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. # Determine the correct sed parameter.
# #
# `sed` is unfortunately not consistent across OSes when it comes to flags. # `sed` is unfortunately not consistent across OSes when it comes to flags.