1 |
#!/bin/sh |
2 |
|
3 |
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 |
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 |
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 |
# re-create global all swish |
16 |
cd /rest/references/swish |
17 |
tmp=/tmp/split |
18 |
rm -f index/all index/all.prop index/*temp |
19 |
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-* |