History

make scripts tree show scripts in directory passed in with --scripts

David Kelly committed 9 years ago

Commit 9417a171 parent 20f713a2 files · +16 −6Browse files

Showing the changes to interface/src/main.cpp (1 of 2 files). Show all

Unified · Split

interface/src/main.cpp+10−0
@@ -73,12 +73,14 @@ int main(int argc, const char* argv[]) { · 72 unmodified lines
7373 QCommandLineOption serverContentPathOption("serverContentPath", "Where to find server content", "serverContentPath");
7474 QCommandLineOption allowMultipleInstancesOption("allowMultipleInstances", "Allow multiple instances to run");
7575 QCommandLineOption overrideAppLocalDataPathOption("cache", "set test cache <dir>", "dir");
76+ QCommandLineOption overrideScriptsPathOption("scripts", "set scripts <path>", "path");
7677 parser.addOption(urlOption);
7778 parser.addOption(noUpdaterOption);
7879 parser.addOption(checkMinSpecOption);
7980 parser.addOption(runServerOption);
8081 parser.addOption(serverContentPathOption);
8182 parser.addOption(overrideAppLocalDataPathOption);
83+ parser.addOption(overrideScriptsPathOption);
8284 parser.addOption(allowMultipleInstancesOption);
8385 parser.parse(arguments);
8486
@@ -99,6 +101,14 @@ int main(int argc, const char* argv[]) { · 14 unmodified lines
99101 if (allowMultipleInstances) {
100102 instanceMightBeRunning = false;
101103 }
104+
105+ if (parser.isSet(overrideScriptsPathOption)) {
106+ QDir scriptsPath(parser.value(overrideScriptsPathOption));
107+ if (scriptsPath.exists()) {
108+ PathUtils::defaultScriptsLocation(scriptsPath.path());
109+ }
110+ }
111+
102112 if (parser.isSet(overrideAppLocalDataPathOption)) {
103113 // get dir to use for cache
104114 QString cacheDir = parser.value(overrideAppLocalDataPathOption);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t