#!/usr/bin/env bash
set -euo pipefail

APP_DIR="${APP_DATA_DIR:-$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/..")}"
DATA_ROOT="${APP_DATA_ROOT:-${APP_DIR}/data}"

# Remove .gitignore file from data directories if they exist

[ -f "${DATA_ROOT}/app/.gitignore" ] && rm -f "${DATA_ROOT}/app/.gitignore"
[ -f "${DATA_ROOT}/db/.gitignore" ] && rm -f "${DATA_ROOT}/db/.gitignore"
