Skip to content
Snippets Groups Projects
Commit 1df5ebcd authored by dgelessus's avatar dgelessus
Browse files

Refactor CliStarter.getOsInfo

parent d5e76ef3
Branches
Tags
No related merge requests found
Pipeline #100991 failed
......@@ -136,25 +136,27 @@ public final class CliStarter {
private OsSpecificInfo getOsInfo(final String os)
throws CliException {
if (os.equals(Platform.OS_MACOSX)) {
return new OsSpecificInfo("macos", "probcli.sh", "sh",
"lib/send_user_interrupt");
}
if (os.equals(Platform.OS_WIN32)) {
return new OsSpecificInfo("windows", "probcli.exe", null,
"lib\\send_user_interrupt.exe");
}
if (os.equals(Platform.OS_LINUX)) {
return new OsSpecificInfo("linux64", "probcli.sh", "sh",
"lib/send_user_interrupt");
}
} else {
final String subdir;
if (os.equals(Platform.OS_MACOSX)) {
subdir = "macos";
} else if (os.equals(Platform.OS_LINUX)) {
subdir = "linux64";
} else {
final CliException cliException = new CliException(
"ProB does not support the plattform: " + os);
cliException.notifyUserOnce();
throw cliException;
}
return new OsSpecificInfo(subdir, "probcli.sh", "sh",
"lib/send_user_interrupt");
}
}
@SuppressWarnings("unchecked")
private void extractCliInformation(final BufferedReader input)
throws CliException {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment