From 8858205270f823a63cb80ad7efdd0d2500c71d14 Mon Sep 17 00:00:00 2001 From: clement Date: Mon, 8 Jun 2020 01:23:34 +0800 Subject: [PATCH] Added script to build prod env --- scripts/build-website.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 scripts/build-website.sh diff --git a/scripts/build-website.sh b/scripts/build-website.sh new file mode 100755 index 0000000..5380b0d --- /dev/null +++ b/scripts/build-website.sh @@ -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