summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/generate.source.sh2
-rw-r--r--lib/template.source.sh5
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/generate.source.sh b/lib/generate.source.sh
index 4ce1600..7c6d49d 100644
--- a/lib/generate.source.sh
+++ b/lib/generate.source.sh
@@ -187,7 +187,7 @@ generate::fromgmi () {
# Only generate draft posts
generate::draft () {
- if [ -n "$CONTENT_FILTER" ]; then
+ if [[ -n "$CONTENT_FILTER" && "$CONTENT_FILTER" != DRAFT- ]]; then
log ERROR "ERROR, you can't set a content filter manually in draft mode"
exit 2
fi
diff --git a/lib/template.source.sh b/lib/template.source.sh
index ec49490..204078d 100644
--- a/lib/template.source.sh
+++ b/lib/template.source.sh
@@ -14,6 +14,11 @@ template::generate () {
log INFO "Converted $num_tpl_files template files"
}
+template::draft () {
+ CONTENT_FILTER=DRAFT-
+ template::generate
+}
+
template::_generate_file () {
local -r tpl_path="$1"; shift
local -r tpl_dir="$(dirname "$tpl_path")"