summaryrefslogtreecommitdiffstats
path: root/scripts/build_content.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build_content.sh')
-rwxr-xr-xscripts/build_content.sh8
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 @@
3SITE_TITLE="Volpeon's Den" 3SITE_TITLE="Volpeon's Den"
4 4
5target () { 5target () {
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
9compile () { 13compile () {
@@ -26,7 +30,7 @@ if [ -z "$1" ]; then
26 done 30 done
27else 31else
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