1 |
262
|
aaronmk
|
#!/bin/bash
|
2 |
|
|
# Runs map with BIEN defaults
|
3 |
|
|
|
4 |
|
|
selfDir="$(dirname -- "$0")"
|
5 |
266
|
aaronmk
|
utilDir="$selfDir/util"
|
6 |
262
|
aaronmk
|
|
7 |
|
|
shopt -s nullglob
|
8 |
|
|
|
9 |
266
|
aaronmk
|
bien_password="$(cat "$utilDir/bien_password")"
|
10 |
262
|
aaronmk
|
|
11 |
|
|
# Defaults
|
12 |
|
|
if test -n "$in_engine"; then
|
13 |
|
|
test -n "$in_host" || export in_host=localhost
|
14 |
|
|
if test -z "$in_user"; then
|
15 |
|
|
if test _"$(hostname)" = _nimoy -a _"$in_engine" = _MySQL; then
|
16 |
|
|
test -n "${mysql_password+t}" || \
|
17 |
266
|
aaronmk
|
. "$utilDir/env_password" mysql_password "your MySQL"
|
18 |
262
|
aaronmk
|
export in_user="$USER" in_password="$mysql_password"
|
19 |
|
|
else
|
20 |
|
|
export in_user=bien in_password="$bien_password"
|
21 |
|
|
fi
|
22 |
|
|
fi
|
23 |
|
|
fi
|
24 |
266
|
aaronmk
|
test _"$out_database" = _vegbien && . "$utilDir/vegbien_dest"
|
25 |
262
|
aaronmk
|
|
26 |
266
|
aaronmk
|
"$utilDir/map" "$@"
|