From: MatthewOwens Date: Sun, 19 Jul 2020 12:36:28 +0000 (+0100) Subject: updated scripts to add optional param so hook can pass tmpdir to gen_feed_item X-Git-Url: https://git.owens.tech/assets/static/git.owens.tech/assets/static/git.owens.tech/git?a=commitdiff_plain;h=619372d6ae131f3afff44911e6912a3c75110191;p=website.git updated scripts to add optional param so hook can pass tmpdir to gen_feed_item --- diff --git a/scripts/gen_feed.sh b/scripts/gen_feed.sh index 5ca1292..ac8867b 100755 --- a/scripts/gen_feed.sh +++ b/scripts/gen_feed.sh @@ -13,7 +13,7 @@ printf '\t\n' diff --git a/scripts/gen_feed_item.sh b/scripts/gen_feed_item.sh index 6c54ad0..a493584 100755 --- a/scripts/gen_feed_item.sh +++ b/scripts/gen_feed_item.sh @@ -1,10 +1,10 @@ # ensuring that at least that the post md file is passed in -[ $# -eq 1 ] || exit 1 +[ $# -eq 0 ] && exit 1 HTMLPATH=$(echo $1 | sed 's/\.md$/.html/') TITLE=$(scripts/post_title.sh $1) BODY=$(markdown $1 | sed -e 's/’/'/g -e 's/‘//g') -DATE=$(git log -1 --pretty="format:%ad" $1) +DATE=$(git log -1 --pretty="format:%ad" $2$1) echo "" echo " $TITLE"