autotasker/init_db.sh

10 lines
269 B
Bash
Executable file

#!/bin/sh
DEFAULT_DB_PATH="/var/lib/autotasker/autotasker.db"
DEFAULT_MIGRATION_PATH="/usr/local/src/autotasker/migrations/all.sql"
DB_PATH="${DB_PATH:-$DEFAULT_DB_PATH}"
MIGRATION_PATH="${MIGRATION_PATH:-$DEFAULT_MIGRATION_PATH}"
sqlite3 $DB_PATH < $MIGRATION_PATH