Skip to content

Commit 945f78a

Browse files
committed
Change download base, autoSoftCommit and rename EZ in Ibexa for solr 9+
1 parent 619a8cd commit 945f78a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bin/generate-solr-config.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,15 @@ if [ "$SOLR_INSTALL_DIR" == "" ]; then
102102
# If we were not provided an existing install directory we'll temporarily download a version of solr to generate config.
103103
GENERATE_SOLR_TMPDIR=`mktemp -d`
104104
echo "Downloading solr bundle:"
105-
curl https://archive.apache.org/dist/lucene/solr/${SOLR_VERSION}/solr-${SOLR_VERSION}.tgz > $GENERATE_SOLR_TMPDIR/solr-${SOLR_VERSION}.tgz
105+
106+
# choose archive path based on SOLR version (> 9.0.0 uses solr/solr)
107+
if [ "$(printf '%s\n' "$SOLR_VERSION" "9.0.0" | sort -V | tail -n1)" != "9.0.0" ]; then
108+
DOWNLOAD_BASE="https://archive.apache.org/dist/solr/solr"
109+
else
110+
DOWNLOAD_BASE="https://archive.apache.org/dist/lucene/solr"
111+
fi
112+
113+
curl "${DOWNLOAD_BASE}/${SOLR_VERSION}/solr-${SOLR_VERSION}.tgz" > "${GENERATE_SOLR_TMPDIR}/solr-${SOLR_VERSION}.tgz"
106114

107115
echo "Untaring"
108116
cd $GENERATE_SOLR_TMPDIR

0 commit comments

Comments
 (0)