projects
/
brisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c783659
)
add override configuration file option to builder.sh
author
Matteo Nastasi
<nastasi@alternativeoutput.it>
Tue, 8 Oct 2019 07:19:19 +0000
(09:19 +0200)
committer
Matteo Nastasi
<nastasi@alternativeoutput.it>
Tue, 8 Oct 2019 20:49:06 +0000
(22:49 +0200)
sql/builder.sh
patch
|
blob
|
history
diff --git
a/sql/builder.sh
b/sql/builder.sh
index
f67fa23
..
16dafab
100755
(executable)
--- a/
sql/builder.sh
+++ b/
sql/builder.sh
@@
-8,7
+8,7
@@
DATECUR="$(date +%s)"
# functions
usage () {
echo " USAGE"
# functions
usage () {
echo " USAGE"
- echo " $0 <command> [-d|--dryrun] [<-a|--allfiles>|<-p|--devfiles>] [-s|--short] ..."
+ echo " $0 <command> [-
c|--config <override_file>] [-
d|--dryrun] [<-a|--allfiles>|<-p|--devfiles>] [-s|--short] ..."
echo " $0 <-h|--help|help>"
echo " commands are:"
echo " create"
echo " $0 <-h|--help|help>"
echo " commands are:"
echo " create"
@@
-77,6
+77,10
@@
shift
while [ $# -gt 0 ]; do
case $1 in
while [ $# -gt 0 ]; do
case $1 in
+ -c|--config)
+ CONFIG_FILE=$2
+ shift
+ ;;
-d|--dryrun)
DRY_RUN=y
psql () {
-d|--dryrun)
DRY_RUN=y
psql () {
@@
-117,6
+121,10
@@
if [ -f $HOME/.brisk_install ]; then
source $HOME/.brisk_install
fi
source $HOME/.brisk_install
fi
+if [ -f "$CONFIG_FILE" ]; then
+ source "$CONFIG_FILE"
+fi
+
pg_args=""
test "$DBHOST" != "" && pg_args="$pg_args -h $DBHOST"
test "$DBUSER" != "" && pg_args="$pg_args -U $DBUSER"
pg_args=""
test "$DBHOST" != "" && pg_args="$pg_args -h $DBHOST"
test "$DBUSER" != "" && pg_args="$pg_args -U $DBUSER"