-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrestartIndexMitab.sh
29 lines (27 loc) · 1.02 KB
/
restartIndexMitab.sh
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
#!/bin/bash
if [ $# == 3 ];
then
MITAB_FILE=$1;
SOLR_URL=$3;
INDEXING_ID=$2;
echo "MITAB file: ${MITAB_FILE}"
echo "SOLR server URL: ${SOLR_URL}"
echo "Indexing job ID: ${INDEXING_ID}"
mvn install -Presume -Dmitab.file=${MITAB_FILE} -Dsolr.url=${SOLR_URL} -Dindexing.id=${INDEXING_ID} -Dmaven.test.skip
elif [ $# == 2 ];
then
MITAB_FILE=$1;
INDEXING_ID=$2;
echo "MITAB file: ${MITAB_FILE}"
echo "SOLR server URL not provided, use default: ${SOLR_URL}"
echo "Indexing job ID: ${INDEXING_ID}"
mvn install -Presume -Dmitab.file=${MITAB_FILE} -Dindexing.id=${INDEXING_ID} -Dmaven.test.skip
else
echo ""
echo "ERROR: wrong number of parameters ($#)."
echo "usage: MITAB_FILE INDEXING_ID SOLR_URL"
echo "usage: MITAB_FILE: the name of the MITAB file to index. Can be 2.5, 2.6 or 2.7"
echo "usage: SOLR_URL: the url of the SOLR server file (By default, if nothing is given, it is : http://localhost:8983/solr)"
echo ""
exit 1
fi