Project

General

Profile

« Previous | Next » 

Revision 1092

map: Exit if password not set

View differences:

map
2 2
# Runs map with BIEN defaults
3 3

  
4 4
selfDir="$(dirname -- "$0")"
5
binDir="$selfDir/bin"
5
bin="$selfDir/bin"
6 6

  
7 7
shopt -s nullglob
8 8

  
......
13 13
    test -n "$in_host" || export in_host=localhost
14 14
    if test -z "$in_user"; then
15 15
        if test _"$(hostname)" = _nimoy -a _"$in_engine" = _MySQL; then
16
            . "$binDir/env_password" mysql_password "your MySQL password"
17
                # will exit this script if password not set
16
            . "$bin/env_password" mysql_password "your MySQL password" || exit
17
                # exit if password not set
18 18
            export in_user="$USER" in_password="$mysql_password"
19 19
            if test "$in_database" = SALVIAS; then in_database=salvias_plots
20 20
            elif test "$in_database" = NYBG; then in_database=bien2_staging
......
24 24
        fi
25 25
    fi
26 26
fi
27
test "$out_database" = vegbien && . "$binDir/vegbien_dest"
27
test "$out_database" = vegbien && . "$bin/vegbien_dest"
28 28

  
29
"$binDir/map" "$@"
29
"$bin/map" "$@"

Also available in: Unified diff