mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:47:08 +00:00
Fix PREFIX usage
This commit is contained in:
@@ -29,13 +29,13 @@
|
||||
# parameters for PostGIS until a better solution is found. Not defined by default.
|
||||
#
|
||||
|
||||
PREFIX="$HOME/etc"
|
||||
PREFIX=${PREFIX:-"$(dirname "$0")/.."}
|
||||
|
||||
PROJECT_ID="$1"
|
||||
PROJECT_NAME="$2"
|
||||
EPSG_CODE="$3"
|
||||
|
||||
TEMPLATE_SQL="$PREFIX/db/schema-template.sql"
|
||||
TEMPLATE_SQL="$PREFIX/etc/db/schema-template.sql"
|
||||
DBNAME=dougal
|
||||
LAST_SURVEY_ID=$(psql -U postgres -h localhost -Atc '\dn survey_[0-9]+' "$DBNAME" |sed -rn 's/^survey_([0-9]+).*$/\1/p' |sort -n |tail -n 1)
|
||||
NEXT_SURVEY_ID=$((LAST_SURVEY_ID+1))
|
||||
|
||||
Reference in New Issue
Block a user