summaryrefslogtreecommitdiff
path: root/new-blog.sh
blob: 130b9a73841d70e16f967733bc7cf5755028a9eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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