if (file.substr(0, 1) == std::string("/"))
local_file = file;
else
+#ifndef WIN32
local_file = _local_directory + "/" + file;
+#else
+ local_file = file;
+#endif
// remote file -> get only file name from in_files
size_t found = file.find_last_of("/");
// Author: André RIBES - EDF R&D
//
#include "Launcher_Job_Command.hxx"
+#include "Basics_DirUtils.hxx"
#ifdef WITH_LIBBATCH
#include <Batch/Batch_Constants.hxx>
// File name
std::string launch_date_port_file = launch_date;
- std::string launch_script = "/tmp/runCommand_" + _job_file_name + "_" + launch_date + ".sh";
+ std::string launch_script = Kernel_Utils::GetTmpDir() + "runCommand_" + _job_file_name + "_" + launch_date + ".sh";
std::ofstream launch_script_stream;
launch_script_stream.open(launch_script.c_str(), std::ofstream::out);
// Author: André RIBES - EDF R&D
//
#include "Launcher_Job_SALOME.hxx"
+#include "Basics_DirUtils.hxx"
#ifdef WITH_LIBBATCH
#include <Batch/Batch_Constants.hxx>
// parameters
std::string work_directory = params[Batch::WORKDIR].str();
- std::string launch_script = "/tmp/runSalome_" + _job_file_name + "_" + _launch_date + ".sh";
+ std::string launch_script = Kernel_Utils::GetTmpDir() + "runSalome_" + _job_file_name + "_" + _launch_date + ".sh";
std::ofstream launch_script_stream;
- launch_script_stream.open(launch_script.c_str(), std::ofstream::out);
+ launch_script_stream.open(launch_script.c_str(),
+ std::ofstream::out
+#ifdef WIN32
+ | std::ofstream::binary //rnv: to avoid CL+RF end of line on windows
+#endif
+ );
// Begin of script
launch_script_stream << "#!/bin/sh -f" << std::endl;