helper/options: Use OPENOCD_SCRIPTS dir if set.
This makes it easier to relocate the install tree of OpenOCD from where it was originally built (for example, if put onto a different machine), without having to change scripts or add something to the command line every time. Change-Id: Ia5edf0eba166f7a999f267bd6a92402dab9b399e Signed-off-by: Jonathan Larmour <jifl@eCosCentric.com> Reviewed-on: http://openocd.zylin.com/3004 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
committed by
Freddie Chopin
parent
d651d7109f
commit
03e240f3bf
@@ -113,6 +113,12 @@ static void add_default_dirs(void)
|
||||
free(path);
|
||||
}
|
||||
}
|
||||
|
||||
path = getenv("OPENOCD_SCRIPTS");
|
||||
|
||||
if (path)
|
||||
add_script_search_dir(path);
|
||||
|
||||
#ifdef _WIN32
|
||||
const char *appdata = getenv("APPDATA");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user