Added script to build prod env

This commit is contained in:
2020-06-08 01:23:34 +08:00
parent c81ae92d90
commit 8858205270

17
scripts/build-website.sh Executable file
View File

@ -0,0 +1,17 @@
#! /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 in {0..$CONTENTNUM}
do
cat filehead "content$i" filetail "quote$i" > blog-00$i
done
# 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