Created
January 31, 2019 20:11
-
-
Save elrayle/2ff075ac34b15f11828932024e84b2a7 to your computer and use it in GitHub Desktop.
solrgo bash scribe -- use `solrgo` to start for use with hyrax app -- use `solrgo -t` to start for use with hyrax tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
ACTION="install" | |
case $1 in | |
-h ) | |
echo '---------------------------' | |
echo 'solr_wrapper startup script' | |
echo '---------------------------' | |
echo 'This script starts solr_wrapper for either ad hoc development through .internal_test app generated by `rake engine_cart:generate`' | |
echo 'or for testing through rspec tests.' | |
echo '' | |
echo '-d start solr for ad hoc development testing through .internal_test app generated by `rake engine_cart:generate`' | |
echo '-t start solr for testing through rspec tests' | |
echo '-h show these help instructions' | |
exit | |
;; | |
-t ) | |
echo '*** Starting SOLR in TEST mode ***' | |
COL_NAME="hydra-test" | |
PORT="-p 8985" | |
RUNPATH="$HOME/Services/solrtest" | |
;; | |
-d | * ) | |
echo '*** Starting SOLR in DEVELOPMENT mode ***' | |
COL_NAME="hydra-development" | |
PORT="" | |
RUNPATH="$HOME/Services/solrdev" | |
;; | |
esac | |
COL="--collection_name $COL_NAME" | |
echo "COL = $COL" | |
RUNFILE="$RUNPATH/bin/solr" | |
if [ -d "$RUNPATH" ] && [ -f "$RUNFILE" ]; then | |
ACTION="run" | |
fi | |
CMD="solr_wrapper -d solr/config/ $COL -i $RUNPATH $PORT" | |
echo "Will run command: $CMD" | |
eval $CMD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To start for testing: solrgo -t
To start for interactive: solrgo
Puts solr in ~/Services/solrtest or solrdev