+ } else if (arg == "-c" || arg == "--csc-update") {
+ // "path=/opt/system/csc/Ozq2iEG15R-2.0.0-arm.wgt:op=install:removable=true"
+ LogDebug("Install & uninstall by csc configuration");
+ if (m_argc != 3) {
+ return showHelpAndQuit();
+ }
+ std::string configuration = m_argv[2];
+ m_CSCconfigurationMap = parseCSCConfiguration(configuration);
+
+ CSCConfiguration::dataMap::iterator it;
+ it = m_CSCconfigurationMap.find(CSCConfiguration::KEY_OP);
+ if (it == m_CSCconfigurationMap.end()) {
+ return showHelpAndQuit();
+ }
+
+ if (it->second == CSCConfiguration::VALUE_INSTALL) {
+ LogDebug("operation = " << it->second);
+ m_installMode = WRT_INSTALL_MODE_INSTALL_WGT;
+ it = m_CSCconfigurationMap.find(CSCConfiguration::KEY_PATH);
+ if (it == m_CSCconfigurationMap.end()) {
+ return showHelpAndQuit();
+ }
+ m_packagePath = it->second;
+ AddStep(&WrtInstaller::installStep);
+ LogDebug("path = " << m_packagePath);
+ } else if (it->second == CSCConfiguration::VALUE_UNINSTALL) {
+ LogDebug("operation = " << it->second);
+ // uninstall command isn't confirmed yet
+ it = m_CSCconfigurationMap.find(CSCConfiguration::KEY_PATH);
+ if (it == m_CSCconfigurationMap.end()) {
+ return showHelpAndQuit();
+ }
+ m_packagePath = it->second;
+ AddStep(&WrtInstaller::unistallWgtFileStep);
+ LogDebug("operation = uninstall");
+ LogDebug("path = " << m_packagePath);
+ } else {
+ LogError("Unknown operation : " << it->second);
+ LogDebug("operation = " << it->second);
+ return showHelpAndQuit();
+ }