disseminate/scripts/docker_run.sh
2024-03-29 01:51:46 -04:00

19 lines
478 B
Bash
Executable file

# 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...'