diff --git a/files/20200504-CV.pdf b/files/20200504-CV.pdf deleted file mode 100644 index 7b4368c..0000000 Binary files a/files/20200504-CV.pdf and /dev/null differ diff --git a/scripts/build-website.sh b/scripts/build-website.sh index 1c7d072..7ee6d79 100755 --- a/scripts/build-website.sh +++ b/scripts/build-website.sh @@ -7,6 +7,7 @@ cd ../blog CONTENTNUM=$(($(ls content-* | wc -l)-1)) for ((i=-1;i<$CONTENTNUM;i++)) do + # separate files by respective static pages padint="$(printf %03d $i)" contentname="content-$padint" quotename="quote-$padint" @@ -15,13 +16,19 @@ do # interactive tail if (( $i >= 0 )) ;then + + # prepare tail template cp filetail "$tailname" + + # increment int if the page exists padintprev="$(printf %03d $(($i - 1)) )" if (( $(($i+1)) == $CONTENTNUM )) ;then padintnext="$(printf %03d -1 )" else padintnext="$(printf %03d $(($i + 1)) )" fi + + # replace placeholders sed -i "s/PREVPADINT/$padintprev/g" "$tailname" sed -i "s/NEXTPADINT/$padintnext/g" "$tailname" fi @@ -32,10 +39,10 @@ do fi done -# clean up non prod files +# clean up non prod files, lock down permissions, and self-destruct cd ../blog -rm filehead filetail content* quote* .blog.* tail* +\rm filehead filetail content* quote* .blog.* tail* cd ../ -rm -rf .git scripts .index.html.* README.md +\rm -rf .git scripts .index.html.* README.md find . -type f | xargs chmod 600 find . -type d | xargs chmod 700