From c0d78285fedd62ef64ed2d24a50360b6d838d1d7 Mon Sep 17 00:00:00 2001 From: secher Date: Fri, 19 Oct 2012 13:39:26 +0000 Subject: [PATCH] generalize variable environment for CCRT --- src/CCC/Batch_BatchManager_eCCC.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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()); -- 2.39.2