aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/subcmd/exec-cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/subcmd/exec-cmd.c')
-rw-r--r--tools/lib/subcmd/exec-cmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/subcmd/exec-cmd.c b/tools/lib/subcmd/exec-cmd.c
index 33e94fb83986..5dbea456973e 100644
--- a/tools/lib/subcmd/exec-cmd.c
+++ b/tools/lib/subcmd/exec-cmd.c
@@ -24,6 +24,9 @@ void exec_cmd_init(const char *exec_name, const char *prefix,
subcmd_config.prefix = prefix;
subcmd_config.exec_path = exec_path;
subcmd_config.exec_path_env = exec_path_env;
+
+ /* Setup environment variable for invoked shell script. */
+ setenv("PREFIX", prefix, 1);
}
#define is_dir_sep(c) ((c) == '/')