summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-03-08 09:50:32 +0100
committerPatrick Spek <p.spek@tyil.nl>2023-03-08 09:50:32 +0100
commiteada1f79054dac6b083675922aa98f4331c051f1 (patch)
treeb789a02f8fe4191034a798262378e183fd177deb
parent256203f82407942d0e33b51905ec81cf43262a1d (diff)
Make future support for additional generators easier
-rw-r--r--playbook.bash10
1 files 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() {