jabe/scripts/docker_run.sh

20 lines
478 B
Bash
Raw Normal View History

2024-03-29 06:51:46 +01:00
# 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...'