Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/woip
diff options
context:
space:
mode:
authorMartin Langhoff <martin@laptop.org>2010-11-03 20:22:24 (GMT)
committer Martin Langhoff <martin@laptop.org>2010-11-03 20:22:24 (GMT)
commit6af768c3b75e0c790fbd6ce09f9f83105948323b (patch)
treea760b3ae50539286ce6d5b83ae9e19040079a366 /woip
parent5c5a19550ea5a9e1caf5b96dde528d4672640a5e (diff)
Tidy up of the merge and process updates scripts.
Diffstat (limited to 'woip')
-rwxr-xr-xwoip/sh/process-updates31
1 files changed, 31 insertions, 0 deletions
diff --git a/woip/sh/process-updates b/woip/sh/process-updates
new file mode 100755
index 0000000..57258c5
--- /dev/null
+++ b/woip/sh/process-updates
@@ -0,0 +1,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
+