Salome HOME
generalize variable environment for CCRT
authorsecher <secher>
Fri, 19 Oct 2012 13:39:26 +0000 (13:39 +0000)
committersecher <secher>
Fri, 19 Oct 2012 13:39:26 +0000 (13:39 +0000)
src/CCC/Batch_BatchManager_eCCC.cxx

index 876dd8312730ae27e78411ce7c0afb9f4884cee0..c13b0f3b75568fb5f70bda107274e98fd9eb2070 100644 (file)
@@ -323,11 +323,10 @@ namespace Batch {
   std::string BatchManager_eCCC::getHomeDir(std::string tmpdir)
   {
     std::string home;
-    int idx = tmpdir.find("Batch/");
-    std::string filelogtemp = tmpdir.substr(idx+6, tmpdir.length());
-    filelogtemp = "/tmp/logs" + filelogtemp + "_home";
+    std::string filelogtemp = generateTemporaryFileName("gethomedir");
 
-    string subCommand = string("echo $HOME");
+    string subCommand = string("echo ");
+    subCommand += tmpdir;
     string command = _protocol.getExecCommand(subCommand, _hostname, _username) + " > " + filelogtemp;
     cerr << command.c_str() << endl;
     int status = system(command.c_str());