diff options
author | davidovski <david@davidovski.xyz> | 2023-07-21 11:47:56 +0200 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-07-21 11:47:56 +0200 |
commit | ba97d2402bcf396c7fc70ae7fc3877117a48a38e (patch) | |
tree | 386028c8aedd1c46c94ca6c0db248a2fb8a82894 /src/shblg.sh | |
parent | 2722747c090f51e12d83ba31c0f53ae34599c09c (diff) |
added readme
Diffstat (limited to 'src/shblg.sh')
-rwxr-xr-x | src/shblg.sh | 12 |
1 files changed, 8 insertions, 4 deletions
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 |