summaryrefslogtreecommitdiff
path: root/src/helper/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper/options.c')
-rw-r--r--src/helper/options.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/helper/options.c b/src/helper/options.c
index 874196ea..3db96fd7 100644
--- a/src/helper/options.c
+++ b/src/helper/options.c
@@ -101,7 +101,22 @@ static void add_default_dirs(void)
* listed last in the built-in search order, so the user can
* override these scripts with site-specific customizations.
*/
- /// @todo Implement @c add_script_search_dir("${HOME}/.openocd").
+
+ const char *home = getenv("HOME");
+
+ if (home)
+ {
+ char *path;
+
+ path = alloc_printf("%s/.openocd", home);
+
+ if (path)
+ {
+ add_script_search_dir(path);
+ free(path);
+ }
+ }
+
add_script_search_dir(PKGDATADIR "/site");
add_script_search_dir(PKGDATADIR "/scripts");
#endif