X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fhelper%2Foptions.c;h=b7db10f92e47131a802c20314a5335e5ceedddc8;hb=refs%2Fchanges%2F88%2F3488%2F3;hp=5351e825077e42d2e70740881c955bd5e9d8ee94;hpb=1fa24ebe399bb064f5d68311e712432b64327472;p=openocd.git
diff --git a/src/helper/options.c b/src/helper/options.c
index 5351e82507..b7db10f92e 100644
--- a/src/helper/options.c
+++ b/src/helper/options.c
@@ -16,9 +16,7 @@
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
+ * along with this program. If not, see . *
***************************************************************************/
#ifdef HAVE_CONFIG_H
@@ -26,8 +24,8 @@
#endif
#include "configuration.h"
-/* @todo the inclusion of server.h here is a layering violation */
-#include
+#include "log.h"
+#include "command.h"
#include
@@ -113,6 +111,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");