From 421f506bf8041a6a1e80b3bb77f03fcb9657fdd0 Mon Sep 17 00:00:00 2001
From: guixxx <guixxx@users.noreply.github.com>
Date: Wed, 12 Apr 2017 18:39:10 -0300
Subject: Improve logic

---
 functions/utilities.zsh | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index bdfce5fd..8f676caf 100644
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -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.
-- 
cgit v1.2.3