summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-07-21 11:47:56 +0200
committerdavidovski <david@davidovski.xyz>2023-07-21 11:47:56 +0200
commitba97d2402bcf396c7fc70ae7fc3877117a48a38e (patch)
tree386028c8aedd1c46c94ca6c0db248a2fb8a82894 /src
parent2722747c090f51e12d83ba31c0f53ae34599c09c (diff)
added readme
Diffstat (limited to 'src')
-rwxr-xr-xsrc/shblg.sh12
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