File: gcnmz-1

package info (click to toggle)
namazu2 2.0.21-22
  • links: PTS
  • area: main
  • in suites: buster
  • size: 7,032 kB
  • sloc: ansic: 14,161; perl: 10,789; sh: 9,355; lisp: 1,147; makefile: 914
file content (45 lines) | stat: -rwxr-xr-x 765 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /bin/sh
#
# Test for gcnmz.
#
LOG=`pwd`/test-log
echo '  *** starting ' $0 >>$LOG
TARGET=`$srcdir/select-data`
TMPDATA=`pwd`/tmp-data

if test ! -d idx5; then
    mkdir idx5
else
    rm -f idx5/NMZ.*
fi

if test -d idx6; then
    rm -rf idx6
fi

# Copy idx4 for testing gcnmz.
cp -rp idx4 idx6


# Copy docments.
if test -d tmp-data; then
    rm -rf tmp-data
fi
cp -rp $TARGET tmp-data

# Remove some documents.
cd $TMPDATA
find . -type f -name '*.txt' -print | xargs rm -f
cd ../


# Simple indexing to make a reference index.
cd ../scripts 
./mknmz -O ../tests/idx5 $TMPDATA >> $LOG
test "$?" != "0" && exit 1  # error if not success

# Apply gcnmz for idx6.
./gcnmz --quiet --no-backup ../tests/idx6
test "$?" != "0" && exit 1  # error if not success

exit 0