buildframework/helium/sf/java/checktools/src/com/nokia/helium/checktools/OSResolver.java
equal
deleted
inserted
replaced
46 * |
46 * |
47 * @param cmd |
47 * @param cmd |
48 * is the command to be formatted. |
48 * is the command to be formatted. |
49 * @return the formatted OS specific command string. |
49 * @return the formatted OS specific command string. |
50 */ |
50 */ |
51 public static String getCommand(String cmd) { |
51 public static String getCommand(String cmd) throws CheckToolException { |
52 StringBuffer buffer = new StringBuffer(); |
52 StringBuffer buffer = new StringBuffer(); |
53 if (isOs("windows")) { |
53 if (isOs("windows")) { |
54 if (!isOs("win9x")) { |
54 if (!isOs("win9x")) { |
55 // Windows XP/2000/NT |
55 // Windows XP/2000/NT |
56 buffer.append("cmd /c "); |
56 buffer.append("cmd /c "); |
69 * |
69 * |
70 * @param family |
70 * @param family |
71 * The OS family |
71 * The OS family |
72 * @return true if the OS matches; otherwise false. |
72 * @return true if the OS matches; otherwise false. |
73 */ |
73 */ |
74 public static boolean isOs(String family) { |
74 public static boolean isOs(String family) throws CheckToolException { |
75 boolean retValue = false; |
75 boolean retValue = false; |
76 if (family != null) { |
76 if (family != null) { |
77 // windows probing logic relies on the word 'windows' in |
77 // windows probing logic relies on the word 'windows' in |
78 // the OS |
78 // the OS |
79 boolean isWindows = OS_NAME.indexOf(FAMILY_WINDOWS) > -1; |
79 boolean isWindows = OS_NAME.indexOf(FAMILY_WINDOWS) > -1; |