Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/woip/sh/process-updates
blob: 57258c5c7482b6517ed6976f410b97b87ee7db19 (plain)
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
#!/bin/sh

set -e 

if [ ! -n "$1" ]; then
  echo "process <file.processed>"
  exit 1
else
  file=`readlink -f $1`
fi

# drop the trailing '.processed'
basename=${file%.processed}

ifile="$basename.index.txt"
echo "Creating index..."
pushd woip/rb
ruby ./index.rb $file > $ifile

sfile="$basename.locate.db"
echo "Creating locate index..."
cat $ifile | LC_ALL=C /usr/libexec/locate.mklocatedb > $sfile

spfile="$basename.locate.prefixdb"
echo "Creating locate prefix index..."
../c/lsearcher -f $sfile -c $spfile -n

bfile="$basename.blocks.db"
echo "Creating block index"
../c/bzipreader -f $ofile -l | awk '{print $2;}' | ../c/blocks $bfile