Project

General

Profile

« Previous | Next » 

Revision 267

Renamed bien_map to map

View differences:

scripts/bien_map
1
#!/bin/bash
2
# Runs map with BIEN defaults
3

  
4
selfDir="$(dirname -- "$0")"
5
utilDir="$selfDir/util"
6

  
7
shopt -s nullglob
8

  
9
bien_password="$(cat "$utilDir/bien_password")"
10

  
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
                . "$utilDir/env_password" mysql_password "your MySQL"
18
            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
test _"$out_database" = _vegbien && . "$utilDir/vegbien_dest"
25

  
26
"$utilDir/map" "$@"
27 0

  
scripts/test/map
69 69
    local stem="$orig_src.$table.$out_fmt"
70 70
    local out="output/$stem${method+.$method}.xml"
71 71
    local accepted="accepted_output/$stem.xml"
72
    (set -x; ../bien_map "$map" >"$out") || exit # abort tester
72
    (set -x; ../map "$map" >"$out") || exit # abort tester
73 73
    (set -x; ${testMode:+diff "$accepted" "$out"})
74 74
    true # ignore last command's exit status
75 75
}
......
79 79
function toDb()
80 80
{
81 81
    trace . "$vegbienDest"
82
    (. "$vegbienDest"; set -x; ../bien_map "$map") || exit # abort tester
82
    (. "$vegbienDest"; set -x; ../map "$map") || exit # abort tester
83 83
}
84 84

  
85 85
for in in input/*; do
scripts/util/inputs_Makefile
7 7
scripts := $(root)/scripts
8 8
util := $(scripts)/util
9 9
mappings := $(root)/mappings
10
map := $(scripts)/bien_map
10
map := $(scripts)/map
11 11
map2vegbien := env out_database=vegbien $(map)
12 12

  
13 13
#####
scripts/map
1
#!/bin/bash
2
# Runs map with BIEN defaults
3

  
4
selfDir="$(dirname -- "$0")"
5
utilDir="$selfDir/util"
6

  
7
shopt -s nullglob
8

  
9
bien_password="$(cat "$utilDir/bien_password")"
10

  
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
                . "$utilDir/env_password" mysql_password "your MySQL"
18
            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
test _"$out_database" = _vegbien && . "$utilDir/vegbien_dest"
25

  
26
"$utilDir/map" "$@"
0 27

  

Also available in: Unified diff