aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/rules.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2017-02-14 00:11:29 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2017-02-14 00:11:29 +0100
commit99ef1c93f0359741fd18217cd81cf2c3e0beaf7b (patch)
tree993788059d2b7b6b8989df1d5d28f259d7bab56c /src/blogc-make/rules.c
parent3d93f3a5e165ec12b97a269ef8fe599981e61e92 (diff)
downloadblogc-99ef1c93f0359741fd18217cd81cf2c3e0beaf7b.tar.gz
blogc-99ef1c93f0359741fd18217cd81cf2c3e0beaf7b.tar.bz2
blogc-99ef1c93f0359741fd18217cd81cf2c3e0beaf7b.zip
blogc-make: renamed copy_files settings to copy
Diffstat (limited to 'src/blogc-make/rules.c')
-rw-r--r--src/blogc-make/rules.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/blogc-make/rules.c b/src/blogc-make/rules.c
index 49fc36c..9f5d9bc 100644
--- a/src/blogc-make/rules.c
+++ b/src/blogc-make/rules.c
@@ -475,15 +475,15 @@ pages_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
// COPY FILES RULE
static bc_slist_t*
-copy_files_outputlist(bm_ctx_t *ctx)
+copy_outputlist(bm_ctx_t *ctx)
{
- if (ctx == NULL || ctx->settings->copy_files == NULL)
+ if (ctx == NULL || ctx->settings->copy == NULL)
return NULL;
bc_slist_t *rv = NULL;
const char *dir = bc_trie_lookup(ctx->settings->settings, "output_dir");
- for (size_t i = 0; ctx->settings->copy_files[i] != NULL; i++) {
- char *f = bc_strdup_printf("%s/%s", dir, ctx->settings->copy_files[i]);
+ for (size_t i = 0; ctx->settings->copy[i] != NULL; i++) {
+ char *f = bc_strdup_printf("%s/%s", dir, ctx->settings->copy[i]);
rv = bc_slist_append(rv, bm_filectx_new(ctx, f));
free(f);
}
@@ -491,16 +491,16 @@ copy_files_outputlist(bm_ctx_t *ctx)
}
static int
-copy_files_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
+copy_exec(bm_ctx_t *ctx, bc_slist_t *outputs, bool verbose)
{
- if (ctx == NULL || ctx->settings->copy_files == NULL)
+ if (ctx == NULL || ctx->settings->copy == NULL)
return 0;
int rv = 0;
bc_slist_t *s, *o;
- for (s = ctx->copy_files_fctx, o = outputs; s != NULL && o != NULL;
+ for (s = ctx->copy_fctx, o = outputs; s != NULL && o != NULL;
s = s->next, o = o->next)
{
bm_filectx_t *o_fctx = o->data;
@@ -687,10 +687,10 @@ const bm_rule_t rules[] = {
.generate_files = true,
},
{
- .name = "copy_files",
+ .name = "copy",
.help = "copy static files from source directory to output directory",
- .outputlist_func = copy_files_outputlist,
- .exec_func = copy_files_exec,
+ .outputlist_func = copy_outputlist,
+ .exec_func = copy_exec,
.generate_files = true,
},
{