aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/ctx.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-27 04:18:39 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-27 04:18:39 +0100
commita913539c26ec3f34bbdf9474b77d528451b2042a (patch)
tree049183e370fd6cd179d09cddeb661f357ff89348 /src/blogc-make/ctx.c
parent879e295de04bc0699462c959a1d331dcf5446345 (diff)
downloadblogc-a913539c26ec3f34bbdf9474b77d528451b2042a.tar.gz
blogc-a913539c26ec3f34bbdf9474b77d528451b2042a.tar.bz2
blogc-a913539c26ec3f34bbdf9474b77d528451b2042a.zip
github-lambda: blogc-make: integrate
Diffstat (limited to 'src/blogc-make/ctx.c')
-rw-r--r--src/blogc-make/ctx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/blogc-make/ctx.c b/src/blogc-make/ctx.c
index 8c9cc9a..7b8dfca 100644
--- a/src/blogc-make/ctx.c
+++ b/src/blogc-make/ctx.c
@@ -81,6 +81,13 @@ bm_ctx_new(const char *settings_file, bc_error_t **err)
}
free(content);
+ // fix output_dir, if forced from environment variable
+ const char *output_dir_env = getenv("OUTPUT_DIR");
+ if (output_dir_env != NULL) {
+ bc_trie_insert(settings->settings, "output_dir",
+ bc_strdup(output_dir_env));
+ }
+
char *atom_template = bm_atom_deploy(settings, err);
if (*err != NULL) {
return NULL;