runHarvest.sh 644 Bytes
#!/bin/bash

DATE=$(date +%F_%X)
cd "$(dirname $0)/../"

if [ $# -eq 1 ]  && [ "$1" == "force" ]; then
	echo "Harvest mode: force"
	ant -Dselector=exclude -Dselector_value="sinbad" force_harvest 1>>./logs/harvest/log_harvest_$DATE.log 2>>./logs/harvest/log_harvest_$DATE.log
	./scripts/executeMainFromClass.sh pt.keep.metarepository.core.solr.SolrClientUtilities optimize
else
	echo "Harvest mode: normal"
	ant -Dselector=exclude -Dselector_value="sinbad" harvest 1>>./logs/harvest/log_harvest_$DATE.log 2>>./logs/harvest/log_harvest_$DATE.log
	./scripts/executeMainFromClass.sh pt.keep.metarepository.core.solr.SolrClientUtilities optimize
fi