Оптимизация команды Exists для SSH
This commit is contained in:
@@ -59,11 +59,12 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
|
||||
ShowMessage1("Сборка SAPFOR...");
|
||||
//-
|
||||
RemoteFile repo_bin = new RemoteFile(repoSapforHome.full_name, "Sapfor_F");
|
||||
if (Exists(repoSapforHome.full_name, repo_bin.name))
|
||||
if (Exists(repo_bin))
|
||||
sftpChannel.rm(repo_bin.full_name);
|
||||
//--
|
||||
performScript(repoSapforHome, "cmake ../", "make -j 4");
|
||||
result = Exists(repoSapforHome.full_name, "Sapfor_F");
|
||||
RemoteFile repoSapfor = new RemoteFile(repoSapforHome, "Sapfor_F");
|
||||
result = Exists(repoSapfor);
|
||||
if (result) {
|
||||
RemoteFile sapforsDirectory = new RemoteFile(testingSystemHome.full_name, "Sapfors", true);
|
||||
//создать папку. Для того чтобы скопировать из репозитория.
|
||||
@@ -116,6 +117,5 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
|
||||
protected void performDone() throws Exception {
|
||||
passes.get(PassCode_2021.PublishServerSapfor).Do(serverSapfor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ public class RemoteInitialiseUser extends CurrentConnectionPass<String> {
|
||||
"cd " + Utils.DQuotes(sftpChannel.pwd()), //нужны ли тут кавычки?
|
||||
"g++ " + starter_code + " -o " + starter,
|
||||
"g++ " + launcher_code + " -o " + launcher,
|
||||
"g++ -O3 -std=c++17 Planner.cpp -o " + planner,
|
||||
"g++ -O3 -std=C++17 Planner.cpp -o " + planner,
|
||||
"chmod 0777 " + starter,
|
||||
"chmod 0777 " + launcher,
|
||||
"chmod 0777 " + planner
|
||||
|
||||
Reference in New Issue
Block a user