Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ diff -u lucene_indexer.sh yoda.sh
- --- lucene_indexer.sh 2009-10-23 18:44:13.106338853 +0000
- +++ yoda.sh 2009-10-23 18:48:21.716561159 +0000
- @@ -17,10 +17,8 @@
- java_home="/opt/java"
- export PATH="$PATH:$java_home/bin"
- -
- cd $lucene_bin
- -# Classpath removed as the daughter script has its own classpath logic
- #===========================================================================
- # run the indexer for each index with given arg
- @@ -28,11 +26,12 @@
- # args should be one of -o -v -c
- #===========================================================================
- -function indexer
- +function index_all
- {
- + args=$1
- j=0
- for i in ${indexes[@]}; do
- - $lucene_bin/buddy-finder-indexer.sh $i $1 &
- + index "$i" "$args"
- pids[$j]=$!
- echo "running $i with pid $!"
- let j++
- @@ -54,6 +53,14 @@
- fi
- }
- +function index
- +{
- + index=$1
- + args=$2
- + $lucene_bin/buddy-finder-indexer.sh $index $args &
- + echo "running $index "
- +}
- +
- #===========================================================================
- # Clean up the build Dir
- @@ -133,29 +140,35 @@
- 'all')
- clean_build
- echo "building $i"
- - indexer ''
- - indexer '-c'
- - indexer '-v'
- - indexer '-o'
- + index_all ''
- + index_all '-c'
- + index_all '-v'
- + index_all '-o'
- # sync_servers
- # reload_servers
- ;;
- 'build')
- clean_build
- - indexer ''
- + index "$2" "$3"
- + wait
- +;;
- +
- +'build_all')
- + clean_build
- + index_all ''
- ;;
- 'check')
- - indexer '-c'
- + index_all '-c'
- ;;
- 'verify')
- - indexer '-v'
- + index_all '-v'
- ;;
- 'optimize')
- - indexer '-o'
- + index_all '-o'
- ;;
- 'sync')
Add Comment
Please, Sign In to add comment