diff options
Diffstat (limited to 'scripts/build_content.sh')
-rwxr-xr-x | scripts/build_content.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/build_content.sh b/scripts/build_content.sh index 992414d..e15293e 100755 --- a/scripts/build_content.sh +++ b/scripts/build_content.sh | |||
@@ -3,7 +3,11 @@ | |||
3 | SITE_TITLE="Volpeon's Den" | 3 | SITE_TITLE="Volpeon's Den" |
4 | 4 | ||
5 | target () { | 5 | target () { |
6 | echo "dist/$(echo ${1%.md}.html | cut -sd / -f 2-)" | 6 | if [ "${1#*.}" = "md" ]; then |
7 | echo "dist/$(echo "${1%.md}.html" | cut -sd / -f 2-)" | ||
8 | else | ||
9 | echo "dist/$(echo "$1" | cut -sd / -f 2-)" | ||
10 | fi | ||
7 | } | 11 | } |
8 | 12 | ||
9 | compile () { | 13 | compile () { |
@@ -26,7 +30,7 @@ if [ -z "$1" ]; then | |||
26 | done | 30 | done |
27 | else | 31 | else |
28 | if [ "$2" = "delete" ]; then | 32 | if [ "$2" = "delete" ]; then |
29 | rm $(target $1) | 33 | rm -rf $(target $1) |
30 | else | 34 | else |
31 | compile "$1" | 35 | compile "$1" |
32 | fi | 36 | fi |