From ba97d2402bcf396c7fc70ae7fc3877117a48a38e Mon Sep 17 00:00:00 2001 From: davidovski Date: Fri, 21 Jul 2023 11:47:56 +0200 Subject: added readme --- src/shblg.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/shblg.sh') diff --git a/src/shblg.sh b/src/shblg.sh index af98ef5..8637bcd 100755 --- a/src/shblg.sh +++ b/src/shblg.sh @@ -2,9 +2,13 @@ INPUT_DIR=blog OUTPUT_DIR=dist -PAGE_TEMPLATE=blog/template.html -while getopts ":o:i:t:" opt; do +usage () { + printf "%s\n" "Usage: shblg [-i input_dir] [-o output_dir]" + exit 1 +} + +while getopts ":o:i:h" opt; do case "$opt" in o) OUTPUT_DIR=$OPTARG/ @@ -14,8 +18,8 @@ while getopts ":o:i:t:" opt; do i) INPUT_DIR=$(realpath $OPTARG) ;; - t) - PAGE_TEMPLATE=$(realpath $OPTARG) + h) + usage ;; esac done -- cgit v1.2.1