20 lines
478 B
Bash
20 lines
478 B
Bash
|
# I'm so bad at bash scripting
|
||
|
if [ -z "$(find posts -mindepth 1 -maxdepth 1)" ]; then
|
||
|
echo '-------------'
|
||
|
echo 'Posts directory is empty, copying default...'
|
||
|
echo '-------------'
|
||
|
cp -r default_posts/* 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
|
||
|
fi
|
||
|
|
||
|
|
||
|
echo 'Starting...'
|
||
|
node index.js
|
||
|
echo 'Exiting...'
|
||
|
|