add returnOS() to OS, to help identify unknown aapt OS's

This commit is contained in:
Connor Tumbleson 2013-09-17 21:52:35 -05:00
parent 02ac674551
commit 5fa3c2d297

View File

@ -17,17 +17,21 @@
package brut.util; package brut.util;
public class OSDetection { public class OSDetection {
private static String OS = System.getProperty("os.name").toLowerCase(); private static String OS = System.getProperty("os.name").toLowerCase();
public static boolean isWindows() { public static boolean isWindows() {
return (OS.indexOf("win") >= 0); return (OS.indexOf("win") >= 0);
} }
public static boolean isMacOSX() { public static boolean isMacOSX() {
return (OS.indexOf("mac") >= 0); return (OS.indexOf("mac") >= 0);
} }
public static boolean isUnix() { public static boolean isUnix() {
return (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 || (OS.indexOf("sunos") >= 0)); return (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 || (OS.indexOf("sunos") >= 0));
} }
public static String returnOS() {
return OS;
}
} }