From: Matteo Nastasi (mop) Date: Thu, 10 Mar 2011 22:34:31 +0000 (+0100) Subject: pull conflicts solved X-Git-Tag: 3.4.2~1 X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=brisk.git;a=commitdiff_plain;h=9cbf3bfaad0cad7feaf6413eb53df0a1475c6303 pull conflicts solved --- 9cbf3bfaad0cad7feaf6413eb53df0a1475c6303 diff --cc sql/builder.sh index 0417a05,74e009c..221bd87 --- a/sql/builder.sh +++ b/sql/builder.sh @@@ -62,24 -59,26 +62,26 @@@ elif [ "$1" = "build" ]; the ( echo "-- MESG: build start" ; one_or_all $2 | grep -iv '^drop' ; echo "-- MESG: build end" ; ) | sqlexe $sht elif [ "$1" = "rebuild" ]; then ( echo "-- MESG: clean start" ; one_or_all $2 | grep -i '^drop' | tac ; echo "-- MESG: clean end" ; \ - echo "-- MESG: build start" ; one_or_all $2 | grep -iv '^drop' ; echo "-- MESG: build end" ; ) \ + echo "-- MESG: build start" ; one_or_all $2 | grep -iv '^drop' ; echo "-- MESG: build end" ; ) \ | sqlexe $sht elif [ "$1" = "psql" ]; then - psql -h $DBHOST -U $DBUSER $DBBASE + psql -h $DBHOST -U $DBUSER $DBBASE $@ + elif [ "$1" = "piped" ]; then + psql -h $DBHOST -U $DBUSER $DBBASE -t -q -A -F '|' $@ elif [ "$1" = "dump" ]; then - if [ $# -eq 1 ]; then - pg_dump -a --inserts -h $DBHOST -U $DBUSER $DBBASE - else - pg_dump -a --inserts -h $DBHOST -U $DBUSER $DBBASE > $2 - fi + if [ $# -eq 1 ]; then + pg_dump -a --inserts -h $DBHOST -U $DBUSER $DBBASE + else + pg_dump -a --inserts -h $DBHOST -U $DBUSER $DBBASE > $2 + fi elif [ "$1" = "dumpall" ]; then - if [ $# -eq 1 ]; then - pg_dump -h $DBHOST -U $DBUSER $DBBASE - else - pg_dump -h $DBHOST -U $DBUSER $DBBASE > $2 - fi + if [ $# -eq 1 ]; then + pg_dump -h $DBHOST -U $DBUSER $DBBASE + else + pg_dump -h $DBHOST -U $DBUSER $DBBASE > $2 + fi elif [ "$1" = "add" ]; then - cat "$2" | psql -h $DBHOST -U $DBUSER $DBBASE + cat "$2" | psql -h $DBHOST -U $DBUSER $DBBASE else echo " USAGE" echo " ./builder create"