From: secher Date: Fri, 19 Oct 2012 13:39:26 +0000 (+0000) Subject: generalize variable environment for CCRT X-Git-Tag: V1_6_0a2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c0d78285fedd62ef64ed2d24a50360b6d838d1d7;p=tools%2Flibbatch.git generalize variable environment for CCRT --- diff --git a/src/CCC/Batch_BatchManager_eCCC.cxx b/src/CCC/Batch_BatchManager_eCCC.cxx index 876dd83..c13b0f3 100644 --- a/src/CCC/Batch_BatchManager_eCCC.cxx +++ b/src/CCC/Batch_BatchManager_eCCC.cxx @@ -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());