Revision 183
Added by Aaron Marcuse-Kubitza about 13 years ago
map | ||
---|---|---|
1 |
#!/bin/sh |
|
1 |
#!/bin/bash
|
|
2 | 2 |
# Tests map on all input/*.csv |
3 | 3 |
# Usage: env [n=<num-rows>] self |
4 | 4 |
|
5 | 5 |
selfDir="$(dirname -- "$0")" |
6 | 6 |
cd "$selfDir" |
7 | 7 |
|
8 |
shopt -s nullglob |
|
9 |
|
|
8 | 10 |
tests_n=2 |
9 | 11 |
testMode= |
10 | 12 |
test -n "$n" || export n="$tests_n" testMode=1 |
... | ... | |
27 | 29 |
test -e "$in" || return 1 |
28 | 30 |
local ext="${in##*.}" # after last "." |
29 | 31 |
for map in "../../mappings/$src-$out_fmt."$table".csv"; do |
30 |
test -e "$map" || continue # glob didn't match anything |
|
31 | 32 |
table="${map%.*}" # remove extension |
32 | 33 |
table="${table##*.}" # after last "." |
33 | 34 |
( |
... | ... | |
72 | 73 |
( |
73 | 74 |
src=VegX method=via_$src |
74 | 75 |
for in in "output/$orig_src."$table".$src.xml"; do |
75 |
test -e "$in" || continue # glob didn't match anything |
|
76 | 76 |
table="${in#*.}" # after first "." |
77 | 77 |
table="${table%%.*}" # before second "." |
78 | 78 |
map toXml |
Also available in: Unified diff
Converted scripts back to bash that required bash-specific features