1 |
dpavlin |
43 |
#!/bin/sh |
2 |
|
|
|
3 |
dpavlin |
105 |
cd /rest/references/swish || exit 1 |
4 |
|
|
|
5 |
|
|
ls index/*.prop | sed -e 's#index/##' -e 's#.prop##' | grep -v all | while read index ; do |
6 |
dpavlin |
102 |
echo "checking $index" |
7 |
|
|
swish-e -f "index/$index" -w "a*" -m 1 > /dev/null || swish-e -S prog -c "config/$index" |
8 |
|
|
done |
9 |
|
|
|
10 |
|
|
rm -f index/all index/all.prop |
11 |
dpavlin |
94 |
swish-e -M `ls index | grep -v \.prop$ | grep -v all | grep -v CVS | sed 's#^#./index/#'` index/all |
12 |
|
|
|
13 |
|
|
exit 1 |
14 |
|
|
|
15 |
dpavlin |
43 |
# re-create global all swish |
16 |
dpavlin |
45 |
cd /rest/references/swish |
17 |
dpavlin |
94 |
tmp=/tmp/split |
18 |
dpavlin |
93 |
rm -f index/all index/all.prop index/*temp |
19 |
dpavlin |
94 |
ls index | grep .prop$ | grep -v all | grep -v CVS | sed -e 's#^#./index/#' -e 's#.prop$##' | split -l 3 - $tmp |
20 |
|
|
nr_splits=`ls $tmp* | wc -l` |
21 |
|
|
nr=0 |
22 |
|
|
ls $tmp* | while read split ; do |
23 |
|
|
nr=`expr $nr + 1` |
24 |
|
|
echo "working on $nr/$nr_splits: $split" |
25 |
|
|
swish-e -M `cat $split` index/split-$nr |
26 |
|
|
done |
27 |
|
|
|
28 |
|
|
echo "merge slices" |
29 |
|
|
swish-e -M `ls index/split-*` index/all |
30 |
|
|
rm index/split-* |