summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlshprung <lshprung@yahoo.com>2021-12-17 18:24:56 -0800
committerlshprung <lshprung@yahoo.com>2021-12-17 18:24:56 -0800
commitd71e8fd114660c1c3dc42f56df5777ba5833ecfc (patch)
tree481621d93c908c7448d7dd10b1887b89c7c19746
parent6f2f76f53efc73a3f9c6e8fa1e80e8618f79701b (diff)
Added github-markdown.css download
-rwxr-xr-xmarkdown-to-github-html.sh9
1 files changed, 9 insertions, 0 deletions
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 "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">" >> "$OUTPUT"
echo "<link rel=\"stylesheet\" href=\"github-markdown.css\">" >> "$OUTPUT"