From d71e8fd114660c1c3dc42f56df5777ba5833ecfc Mon Sep 17 00:00:00 2001 From: lshprung Date: Fri, 17 Dec 2021 18:24:56 -0800 Subject: Added github-markdown.css download --- markdown-to-github-html.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'markdown-to-github-html.sh') diff --git a/markdown-to-github-html.sh b/markdown-to-github-html.sh index 527d289..1102c36 100755 --- a/markdown-to-github-html.sh +++ b/markdown-to-github-html.sh @@ -59,6 +59,15 @@ if [ $CUSTOM_OUTPUT -eq 1 ] && [ -e "$OUTPUT" ]; then fi fi +# Prompt to download CSS file if not in CWD or same directory as NAME +if [ ! -e "github-markdown.css" ] || [ ! -e "$(dirname "$NAME")/github-markdown.css" ]; then + echo -n "Download github-markdown.css to current working directory? [Y/n] " + read -r PROMPT + if [ ! "$PROMPT" = "n" ]; then + wget "$CSS_LINK" + fi +fi + # Add meta, link, and style lines to OUTPUT echo "" >> "$OUTPUT" echo "" >> "$OUTPUT" -- cgit