| 1 | #!/bin/sh |
|---|
| 2 | |
|---|
| 3 | if [ $# -lt 1 ];then |
|---|
| 4 | echo "syntax $0 arbfile [treename] (no .arb ending)" |
|---|
| 5 | exit -1; |
|---|
| 6 | fi |
|---|
| 7 | |
|---|
| 8 | mkdir test.$1 |
|---|
| 9 | |
|---|
| 10 | echo optimizing database |
|---|
| 11 | arb_2_bin -c$2 $1.arb test.$1/$1_o1.arb |
|---|
| 12 | |
|---|
| 13 | echo generate mapfile |
|---|
| 14 | arb_2_bin -m test.$1/$1_o1.arb test.$1/$1_o1m.arb |
|---|
| 15 | |
|---|
| 16 | echo optimizing optimized |
|---|
| 17 | arb_2_bin -c$2 test.$1/$1_o1.arb test.$1/$1_o2.arb |
|---|
| 18 | |
|---|
| 19 | echo optimizing optimized mapfile |
|---|
| 20 | arb_2_bin -c$2 -t test.$1/$1_o1m.arb test.$1/$1_o2m.arb |
|---|
| 21 | |
|---|
| 22 | echo ' generate original ascii file' |
|---|
| 23 | arb_2_ascii $1.arb test.$1/$1_a.arb |
|---|
| 24 | |
|---|
| 25 | echo ' generate optimized ascii file' |
|---|
| 26 | arb_2_ascii test.$1/$1_o1.arb test.$1/$1_o1_a.arb |
|---|
| 27 | |
|---|
| 28 | echo ' generate optimized map ascii file' |
|---|
| 29 | arb_2_ascii test.$1/$1_o1m.arb test.$1/$1_o1m_a.arb |
|---|
| 30 | |
|---|
| 31 | echo ' generate optimized2 ascii file' |
|---|
| 32 | arb_2_ascii test.$1/$1_o2.arb test.$1/$1_o2_a.arb |
|---|
| 33 | |
|---|
| 34 | echo ' generate optimized2 map ascii file' |
|---|
| 35 | arb_2_ascii test.$1/$1_o2m.arb test.$1/$1_o2m_a.arb |
|---|
| 36 | |
|---|
| 37 | echo ' regenerate binary ascii' |
|---|
| 38 | arb_2_bin test.$1/$1_a.arb test.$1/$1_ab.arb |
|---|
| 39 | arb_2_ascii test.$1/$1_ab.arb test.$1/$1_aba.arb |
|---|
| 40 | |
|---|
| 41 | echo 'check original and optimized' |
|---|
| 42 | cmp test.$1/$1_a.arb test.$1/$1_o1_a.arb || echo '***' |
|---|
| 43 | |
|---|
| 44 | echo check optimized and optimized map |
|---|
| 45 | cmp test.$1/$1_o1_a.arb test.$1/$1_o1m_a.arb |
|---|
| 46 | |
|---|
| 47 | echo check opti and opti2 |
|---|
| 48 | cmp test.$1/$1_o1_a.arb test.$1/$1_o2_a.arb |
|---|
| 49 | |
|---|
| 50 | echo check opti and opti2 map |
|---|
| 51 | cmp test.$1/$1_o1_a.arb test.$1/$1_o2m_a.arb |
|---|
| 52 | |
|---|
| 53 | echo check source and regenerated |
|---|
| 54 | cmp test.$1/$1_a.arb test.$1/$1_aba.arb |
|---|