Files
personal-website/scripts/build-website.sh
2020-06-08 16:33:48 +08:00

19 lines
443 B
Bash
Executable File

#! /bin/bash
# just gonna assume you're executing in the scripts folder
# build the blog files
cd ../blog
CONTENTNUM=$(ls content-* | wc -l )
for ((i=0;i<=$CONTENTNUM;i++))
do
cat filehead "content-$(printf %03d $i)" "quote-$(printf %03d $i)" > blog-00$i
done
rm filehead content* quote* .blog.*
# clean up non prod files
cd ../
rm -rf .git scripts .index.html.* README.md
find . -type f | xargs chmod 600
find . -type d | xargs chmod 700