Code cleanup/polish
This commit is contained in:
parent
66189e9155
commit
d9f3a6861f
@ -186,8 +186,6 @@ class OsUtil {
|
|||||||
|
|
||||||
// ID=fedora
|
// ID=fedora
|
||||||
if (output.contains("ID=fedora\n")) {
|
if (output.contains("ID=fedora\n")) {
|
||||||
int fedoraVersion = 0;
|
|
||||||
|
|
||||||
// should be: VERSION_ID=23\n or something
|
// should be: VERSION_ID=23\n or something
|
||||||
int beginIndex = output.indexOf("VERSION_ID=") + 11;
|
int beginIndex = output.indexOf("VERSION_ID=") + 11;
|
||||||
String fedoraVersion_ = output.substring(beginIndex, output.indexOf(OS.LINE_SEPARATOR_UNIX, beginIndex));
|
String fedoraVersion_ = output.substring(beginIndex, output.indexOf(OS.LINE_SEPARATOR_UNIX, beginIndex));
|
||||||
@ -223,6 +221,11 @@ class OsUtil {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static
|
||||||
|
boolean isFedora() {
|
||||||
|
return getInfo().contains("ID=fedora\n");
|
||||||
|
}
|
||||||
|
|
||||||
public static
|
public static
|
||||||
boolean isLinuxMint() {
|
boolean isLinuxMint() {
|
||||||
return getInfo("linuxmint");
|
return getInfo("linuxmint");
|
||||||
|
Loading…
Reference in New Issue
Block a user