| 114 | } |
| 115 | |
| 116 | string DB::getPath(const string& program) |
| 117 | { |
| 118 | stringstream echoStream, pathStream; |
| 119 | echoStream |
| 120 | << "echo `which " << program << "` > temp.txt"; |
| 121 | systemOrExit(echoStream.str().c_str()); |
| 122 | ifstream ifile("temp.txt"); |
| 123 | if (ifile) { |
| 124 | string line; |
| 125 | while (getline (ifile, line)) pathStream << line; |
| 126 | } |
| 127 | systemOrExit("rm -f temp.txt"); |
| 128 | return pathStream.str(); |
| 129 | } |
| 130 | |
| 131 | bool DB::definePeVars(const string& id) |
| 132 | { |
nothing calls this directly
no test coverage detected