Added getInstalledDir to ToolApp. #4696

This commit is contained in:
Adam Potolsky 2015-06-01 16:43:27 -07:00
parent 4bf1eeb065
commit 98bb9b3fb3
4 changed files with 10 additions and 1 deletions

View File

@ -180,6 +180,10 @@ ArgParser::parseToolArgs(ToolArgs& args, int argc, const char* const* argv)
args.m_getPluginList = true;
return true;
}
else if (isArg(i, argc, argv, NULL, "--get-installed-dir", 0)) {
args.m_getInstalledDir = true;
return true;
}
else if (isArg(i, argc, argv, NULL, "--get-plugin-dir", 0)) {
args.m_getPluginDir = true;
return true;

View File

@ -74,6 +74,9 @@ ToolApp::run(int argc, char** argv)
else if (m_args.m_getPluginList) {
getPluginList();
}
else if (m_args.m_getInstalledDir) {
std::cout << ARCH->getInstalledDirectory() << std::endl;
}
else if (m_args.m_getPluginDir) {
std::cout << ARCH->getPluginDirectory() << std::endl;
}

View File

@ -22,6 +22,7 @@ ToolArgs::ToolArgs() :
m_loginAuthenticate(false),
m_getPluginList(false),
m_getPluginDir(false),
m_getInstalledDir(false),
m_getProfileDir(false)
{
}

View File

@ -28,6 +28,7 @@ public:
bool m_loginAuthenticate;
bool m_getPluginList;
bool m_getPluginDir;
bool m_getInstalledDir;
bool m_getProfileDir;
bool m_getArch;
};