From eada1f79054dac6b083675922aa98f4331c051f1 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Wed, 8 Mar 2023 09:50:32 +0100 Subject: Make future support for additional generators easier --- playbook.bash | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/playbook.bash b/playbook.bash index e2c0617..bb1aacd 100644 --- a/playbook.bash +++ b/playbook.bash @@ -24,8 +24,14 @@ playbook_sync() { git -C "$path" fetch "$remote" "$branch" git -C "$path" reset --hard "$remote/$branch" - hugo -D # This will generate all the draft content - hugo # And this will generate the actual live blog, but won't remove the draft content + case "$(config "$BASHTARD_PLAYBOOK.generator")" in + hugo) + hugo -D # This will generate all the draft content + hugo # And this will generate the actual live blog, but won't remove the draft content + ;; + *) + crit "$BASHTARD_PLAYBOOK/sync" "Unsupported generator '$(config "$BASHTARD_PLAYBOOK.generator")'" + esac } playbook_del() { -- cgit v1.1