From 31e35884dddc05d0060f4e3b5a727bd2bde7ec3b Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Wed, 2 Dec 2020 17:38:49 -0600 Subject: [PATCH] Add --config option where you can pass in a custom path for configuration files --- cli.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cli.cpp b/cli.cpp index c7d28bac..d19321d4 100644 --- a/cli.cpp +++ b/cli.cpp @@ -375,6 +375,7 @@ void OptionHelp() help_text += " USE I2C TOOLS AT YOUR OWN RISK! Don't use this option if you don't know what you're doing!\n"; help_text += " There is a risk of bricking your motherboard, RGB controller, and RAM if you send invalid SMBus/I2C transactions.\n"; help_text += "--localconfig Use the current working directory instead of the global configuration directory.\n"; + help_text += "--config path Use a custom path instead of the global configuration directory.\n"; help_text += "--nodetect Do not try to detect hardware or autoconnect to a local server at startup.\n"; std::cout << help_text << std::endl; @@ -807,7 +808,8 @@ int ProcessOptions(int argc, char *argv[], Options *options, std::vectorSetConfigurationDirectory("./"); } + /*---------------------------------------------------------*\ + | --config | + \*---------------------------------------------------------*/ + else if(option == "--config") + { + ResourceManager::get()->SetConfigurationDirectory(argument); + arg_index++; + } + /*---------------------------------------------------------*\ | --nodetect | \*---------------------------------------------------------*/