diff options
| author | Paul Buetow <paul@buetow.org> | 2023-03-12 12:10:11 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-03-12 12:10:11 +0200 |
| commit | 921a1067f48b4c044335601610b6ba704aaa3cf9 (patch) | |
| tree | 192ddcde314ff680158e70e4ed1d0b17e955bb22 /lib/generate.source.sh | |
| parent | b66ab729a7e90d67d3b802f9c1a4d2b91b0683c8 (diff) | |
add xmllint support
Diffstat (limited to 'lib/generate.source.sh')
| -rw-r--r-- | lib/generate.source.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/generate.source.sh b/lib/generate.source.sh index 9a9e90b..281fbe0 100644 --- a/lib/generate.source.sh +++ b/lib/generate.source.sh @@ -129,7 +129,7 @@ generate::fromgmi () { # Add content while read -r src; do # User can specify a content filter - if test ! -z "$CONTENT_FILTER" && ! $GREP -q "$CONTENT_FILTER" <<< "$src"; then + if test -n "$CONTENT_FILTER" && ! $GREP -q "$CONTENT_FILTER" <<< "$src"; then continue fi @@ -188,13 +188,13 @@ generate::fromgmi () { # Only generate draft posts generate::draft () { - if [ ! -z "$CONTENT_FILTER" ]; then + if [ -n "$CONTENT_FILTER" ]; then log ERROR "ERROR, you can't set a content filter manually in draft mode" exit 2 fi CONTENT_FILTER=DRAFT- - generate::fromgmi $@ + generate::fromgmi "$@" log INFO 'For HTML preview, open in your browser:' - find $CONTENT_BASE_DIR/html -name DRAFT-\*.html + find "$CONTENT_BASE_DIR/html" -name DRAFT-\*.html } |
