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

Refactor CliStarter.getOsInfo

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