Skip to content

Conversation

lbartoletti
Copy link
Collaborator

  1. Replace more gnued/linuxism script
    1.1. getopt
    Using long args with getopt is a linuxism. So I include a "compat mode" for it. More details on stackoverflow
    1.2. sed
    sed r is the GNU sed version. Use coreutils with gsed for non linux. Or easiest, use cat
    1.3. sleep
    Use only the number of seconds without the suffix.

  2. upgrade_db.sh
    2.1. SCRIPTDIR
    Add the location of the script. Since you can run it everywhere
    2.2. DB info from pg_service.conf
    TODO is done. Get the host and the port for dbcomp and dbtest.
    Maybe add an option for the location of .pg_service.conf?
    Wouldn't it be better if this part were done by PUM?

@sylvainbeo
Copy link
Collaborator

Looks good to me.

@haubourg
Copy link
Contributor

reviewed also by @mhugo :) >> merging

@haubourg haubourg merged commit 3d5b625 into qwat:master Feb 22, 2018
DBTEST_HOST=$(sed -n -e "/^\[qwat_test]/,/^\[/ p" ~/.pg_service.conf | grep "^host" | cut -d"=" -f2)
DBTEST_PORT=$(sed -n -e "/^\[qwat_test]/,/^\[/ p" ~/.pg_service.conf | grep "^port" | cut -d"=" -f2)

if [ ! -z "$DBCOMP_HOST" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any difference between ! -z and -n?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants