21 lines
482 B
Bash
Executable File
21 lines
482 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# This runs the DBIx schema loader, for easy rerunning since it's a
|
|
# lengthy command.
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
shopt -s globstar nullglob
|
|
|
|
declare -r mydir="$(realpath $(dirname $0))"
|
|
if [[ "$PWD" != "$mydir" ]]; then
|
|
echo "Run me in my directory, i.e. '$mydir'" >&2
|
|
exit 1
|
|
else
|
|
perl -MDBIx::Class::Schema::Loader=make_schema_at,dump_to_dir:./lib \
|
|
-e 'make_schema_at("Book::Schema", { debug => 1 }, [ "dbi:Pg:" ])'
|
|
fi
|
|
|
|
exit 0
|