Add service as 3rd parameter
[pazpar2-moved-to-github.git] / perf / bash / client.sh
1 #!/bin/bash
2 OF=$1
3 if test -z "$OF"; then
4         OF=1
5 fi
6
7 PORT=$2
8 if test -z "$PORT"; then
9         PORT=9004
10 fi
11 SERVICE=$3
12 if test -z "$SERVICE"; then
13         SERVICE=perf
14 fi
15
16
17 H="http://localhost:${PORT}/search.pz2"
18 wget -q -O $OF.init.xml "$H/?command=init&service=${SERVICE}&extra=$OF"
19 S=`xsltproc get_session.xsl $OF.init.xml`
20 wget -q -O $OF.search.xml "$H?command=search&query=100&session=$S"
21 sleep 1
22 wget -q -O $OF.show.xml "$H?command=show&session=$S&num=100&block=1"