Rename UpdaterOptions::script to UpdaterOptions::scriptPath for clarity

This commit is contained in:
Robert Knight 2011-08-23 16:34:34 +01:00
parent 214f2273b9
commit e294c35965
4 changed files with 7 additions and 7 deletions

View File

@ -70,7 +70,7 @@ void UpdaterOptions::parseOldFormatArgs(int argc, char** argv)
}
else if (key == "UpdateScriptFileName")
{
script = value;
scriptPath = value;
}
else if (key == "AppFileName")
{
@ -116,7 +116,7 @@ void UpdaterOptions::parse(int argc, char** argv)
}
if (parser.getValue("script"))
{
script = parser.getValue("script");
scriptPath = parser.getValue("script");
}
if (parser.getValue("wait"))
{

View File

@ -12,7 +12,7 @@ class UpdaterOptions
UpdateInstaller::Mode mode;
std::string installDir;
std::string packageDir;
std::string script;
std::string scriptPath;
long long waitPid;
std::string logFile;

View File

@ -49,15 +49,15 @@ int main(int argc, char** argv)
UpdateInstaller installer;
UpdateScript script;
if (!options.script.empty())
if (!options.scriptPath.empty())
{
script.parse(options.script);
script.parse(options.scriptPath);
}
LOG(Info,"started updater. install-dir: " + options.installDir
+ ", package-dir: " + options.packageDir
+ ", wait-pid: " + intToStr(options.waitPid)
+ ", script-path: " + options.script
+ ", script-path: " + options.scriptPath
+ ", mode: " + intToStr(options.mode));
installer.setMode(options.mode);

View File

@ -20,7 +20,7 @@ void TestUpdaterOptions::testOldFormatArgs()
TEST_COMPARE(options.mode,UpdateInstaller::Setup);
TEST_COMPARE(options.installDir,"/path/to/app");
TEST_COMPARE(options.packageDir,"/tmp/updater");
TEST_COMPARE(options.script,"/tmp/updater/file_list.xml");
TEST_COMPARE(options.scriptPath,"/tmp/updater/file_list.xml");
TEST_COMPARE(options.waitPid,123456);
}