Apache Solr open-source search software
SOLR-14704 add download option to cloud.sh (#1715)
Gus Heck65da5ed32c94
diff --git a/solr/cloud-dev/cloud.sh b/solr/cloud-dev/cloud.shindex 3b6d710da53..2ae7cbb8823 100644--- a/solr/cloud-dev/cloud.sh+++ b/solr/cloud-dev/cloud.sh@@ -25,6 +25,7 @@# -n <num> number of nodes to create/start if this doesn't match error# -w <path> path to the vcs checkout# -z <num> port to look for zookeeper on (2181 default)+# -d <url> Download solr tarball from this URL## Commands:# new Create a new cluster named by the current date or [name]@@ -109,7 +110,7 @@ NUM_NODES=0 # need to detect if not specifiedVCS_WORK=${DEFAULT_VCS_WORKSPACE}ZK_PORT=2181-while getopts ":crm:a:n:w:z:" opt; do+while getopts ":crm:a:n:w:z:d:" opt; docase ${opt} inc)CLEAN=true@@ -132,6 +133,9 @@ while getopts ":crm:a:n:w:z:" opt; doz)ZK_PORT=$OPTARG;;+ d)+ SMOKE_RC_URL=$OPTARG+ ;;\?)echo "Invalid option: -$OPTARG" >&2exit 1@@ -267,17 +271,20 @@ recompileIfReq() {# Copy tarball #################copyTarball() {- echo "foo"pushd ${CLUSTER_WD}- echo "bar"rm -rf solr-* # remove tarball and dir to which it extracts- echo "baz"pushd # back to original dir to properly resolve vcs working dir- echo "foobar:"$(pwd)- if [[ ! -f $(ls "$VCS_WORK"/solr/package/solr-*.tgz) ]]; then- echo "No solr tarball found try again with -r"; popd; exit 10;+ if [ ! -z "$SMOKE_RC_URL" ]; then+ pushd ${CLUSTER_WD}+ RC_FILE=$(echo "${SMOKE_RC_URL}" | rev | cut -d '/' -f 1 | rev)+ curl -o "$RC_FILE" "$SMOKE_RC_URL"+ pushd+ else+ if [[ ! -f $(ls "$VCS_WORK"/solr/package/solr-*.tgz) ]]; then+ echo "No solr tarball found try again with -r"; popd; exit 10;+ fi+ cp "$VCS_WORK"/solr/package/solr-*.tgz ${CLUSTER_WD}fi- cp "$VCS_WORK"/solr/package/solr-*.tgz ${CLUSTER_WD}pushd # back into cluster wd to unpacktar xzvf solr-*.tgzpopd