summaryrefslogtreecommitdiff
path: root/new-blog.sh
diff options
context:
space:
mode:
authorStephen Enders <senders@spotify.com>2019-01-21 23:50:18 -0500
committerStephen Enders <senders@spotify.com>2019-01-21 23:50:18 -0500
commit4c43ffa3107e7daab8565241c5e6764e1d6e92d1 (patch)
treec8eb869e3363b699328d176f2b9867a5d9975a12 /new-blog.sh
parentb59c8c6cb0a649092749f7432772acfeb6714d27 (diff)
2019-01-21 Post + So many updates to the site in general
Diffstat (limited to 'new-blog.sh')
-rwxr-xr-xnew-blog.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/new-blog.sh b/new-blog.sh
new file mode 100755
index 0000000..130b9a7
--- /dev/null
+++ b/new-blog.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+set -e
+# Help
+
+if [ "$1" == "--help" ]; then
+ HELP=1
+fi
+if [ $# == 0 ]; then
+ HELP=1
+fi
+
+if [ "$HELP" == "1" ]; then
+ echo "./new-blog [iso-date]"
+ echo " This will create a new file in www/blog with the date sent."
+ echo " It will also add the necessary boilerplate to the html file."
+fi
+
+DATE=$1
+
+
+# Init File
+mkdir www/blog/${DATE}
+cat templates/blog.html > www/blog/${DATE}/index.html
+