13 lines
325 B
Bash
13 lines
325 B
Bash
#!/usr/bin/env bash
|
|
|
|
# generate 'internal/setup/sql.json' file
|
|
|
|
CWD="$(dirname "$0")"
|
|
SQL_JSON="${CWD}/../internal/setup/sql.json"
|
|
|
|
if [ "$1" = "--force" ] || [ ! -f "$SQL_JSON" ]; then
|
|
rm -f "$SQL_JSON"
|
|
go run "${CWD}"/../cmd/sql-dump/main.go -dir="${CWD}"
|
|
else
|
|
echo "sql.json exists, skip (use --force to regenerate)"
|
|
fi |