#!/bin/sh
# Copy built-in posts to docker volume if the volume is empty
if [ -d /app/posts ] && [ -d /app/docker ] && [ "$(ls -A /app/docker)" = "" ]; then
  cp -r /app/posts/* /app/docker/
fi
exec "$@"
