doing stuff l8r
This commit is contained in:
parent
4ea74c0cb1
commit
57016f4f3f
13 changed files with 28 additions and 7 deletions
|
@ -1,15 +1,36 @@
|
|||
# I'm so bad at bash scripting
|
||||
cat << EOF
|
||||
|
||||
____ ______________ __
|
||||
/ __ \/ _/ ___/ ___// /
|
||||
/ / / // / \__ \\__ \/ /
|
||||
/ /_/ // / ___/ /__/ /_/
|
||||
/_____/___//____/____(_)
|
||||
|
||||
EOF
|
||||
if [ ! -d data ]; then
|
||||
echo '-------------'
|
||||
echo 'Data folder not found. Did you set up a volume?'
|
||||
echo '-------------'
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f data/config.json ]; then
|
||||
echo '-------------'
|
||||
echo 'Config file not found. Please create one.'
|
||||
echo '-------------'
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$(find posts -mindepth 1 -maxdepth 1)" ]; then
|
||||
echo '-------------'
|
||||
echo 'Posts directory is empty, copying default...'
|
||||
echo '-------------'
|
||||
cp -r default_posts/* posts
|
||||
cp -r default_posts/* data/posts
|
||||
fi
|
||||
if [ -z "$(find templates -mindepth 1 -maxdepth 1)" ]; then
|
||||
echo '-------------'
|
||||
echo 'Template directory is empty, copying default...'
|
||||
echo '-------------'
|
||||
cp -r default_templates/* templates
|
||||
cp -r default_templates/* data/templates
|
||||
fi
|
||||
|
||||
|
||||
|
|
Reference in a new issue