2020-06-08 01:23:34 +08:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
# just gonna assume you're executing in the scripts folder
|
|
|
|
|
|
|
|
# build the blog files
|
|
|
|
cd ../blog
|
2020-06-08 16:01:45 +08:00
|
|
|
CONTENTNUM=$(ls content-* | wc -l )
|
2020-06-08 01:23:34 +08:00
|
|
|
for i in {0..$CONTENTNUM}
|
|
|
|
do
|
2020-06-08 16:01:45 +08:00
|
|
|
cat filehead "content-$(printf \"%03d\" $i)" "quote-$(printf \"%03d\" $i)" > blog-00$i
|
2020-06-08 01:23:34 +08:00
|
|
|
done
|
2020-06-08 15:36:29 +08:00
|
|
|
rm filehead content* quote* .blog.*
|
2020-06-08 01:23:34 +08:00
|
|
|
|
|
|
|
# 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
|