diff options
author | Tom Rondeau | 2013-02-19 10:48:37 -0500 |
---|---|---|
committer | Tom Rondeau | 2013-02-19 10:52:43 -0500 |
commit | 0e5ccb49db08055cdb3f2de4beadc8de31ff31e5 (patch) | |
tree | 4a096eb721bb90cf7fdf21cc3e547c4f17c3ff14 /gnuradio-core | |
parent | b5bc1a3359e13a24e3329d92f32092e599e52d40 (diff) | |
download | gnuradio-0e5ccb49db08055cdb3f2de4beadc8de31ff31e5.tar.gz gnuradio-0e5ccb49db08055cdb3f2de4beadc8de31ff31e5.tar.bz2 gnuradio-0e5ccb49db08055cdb3f2de4beadc8de31ff31e5.zip |
core: prefs setup looks for a local .gnuradio/config.conf to use.
Order of precedence:
env. vars -> .gnuradio/config.conf -> ${prefix}/etc/gnuradio/conf.d/*
Diffstat (limited to 'gnuradio-core')
-rw-r--r-- | gnuradio-core/src/lib/general/gr_prefs.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/general/gr_prefs.cc b/gnuradio-core/src/lib/general/gr_prefs.cc index 37ca7c6f3..9fddea6d2 100644 --- a/gnuradio-core/src/lib/general/gr_prefs.cc +++ b/gnuradio-core/src/lib/general/gr_prefs.cc @@ -25,6 +25,7 @@ #endif #include <gr_prefs.h> +#include <gr_sys_paths.h> #include <gr_constants.h> #include <algorithm> @@ -77,6 +78,17 @@ gr_prefs::_sys_prefs_filenames() fnames.push_back(p.string()); } std::sort(fnames.begin(), fnames.end()); + + // Find if there is a ~/.gnuradio/config file and add this to the + // beginning of the file list to override any preferences in the + // installed path config files. + fs::path homedir = fs::path(gr_appdata_path()); + homedir /= ".gnuradio/config.conf"; + std::cerr << "Checking path:" << homedir << std::endl; + if(fs::exists(homedir)) { + fnames.insert(fnames.begin(), homedir.string()); + } + return fnames; } |