Skip to content

Commit e15fe64

Browse files
authored
Merge pull request #739 from basho/aws-fix
Added workaround for missing Solr and yokozuna artifacts on AWS
2 parents 4721fc4 + 2faa60b commit e15fe64

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tools/grab-solr.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
22
#
33
# Script to grab Solr and embed in priv dir. This script assumes it is
44
# being called from root dir or tools dir.
@@ -25,6 +25,7 @@ TMP_FILE=$TMP_DIR/$FILENAME
2525
SRC_DIR=$BUILD_DIR/$VSN
2626
EXAMPLE_DIR=$SRC_DIR/example
2727
COL1_DIR=$EXAMPLE_DIR/solr/collection1
28+
: ${ARTIFACT_URL_PREFIX:="http://s3.amazonaws.com/files.basho.com"}
2829

2930
check_for_solr()
3031
{
@@ -52,7 +53,7 @@ get_solr()
5253
ln -s $TMP_FILE $FILENAME
5354
else
5455
echo "Pulling Solr from S3"
55-
download "http://s3.amazonaws.com/files.basho.com/solr/$FILENAME"
56+
download "${ARTIFACT_URL_PREFIX}/solr/$FILENAME"
5657
if [ -d $TMP_DIR ]; then
5758
cp $FILENAME $TMP_DIR
5859
else
@@ -120,7 +121,7 @@ then
120121
fi
121122

122123
echo "Downloading $YZ_JAR_NAME"
123-
download "http://s3.amazonaws.com/files.basho.com/yokozuna/$YZ_JAR_NAME"
124+
download "${ARTIFACT_URL_PREFIX}/yokozuna/$YZ_JAR_NAME"
124125
mv $YZ_JAR_NAME $JAVA_LIB/$YZ_JAR_NAME
125126
fi
126127

@@ -131,6 +132,6 @@ MON_JAR_NAME=yz_monitor-$MON_JAR_VSN.jar
131132
if [ ! -e $EXT_LIB/$MON_JAR_NAME ]
132133
then
133134
echo "Downloading $MON_JAR_NAME"
134-
download "http://s3.amazonaws.com/files.basho.com/yokozuna/$MON_JAR_NAME"
135+
download "${ARTIFACT_URL_PREFIX}/yokozuna/$MON_JAR_NAME"
135136
mv $MON_JAR_NAME $EXT_LIB/$MON_JAR_NAME
136137
fi

0 commit comments

Comments
 (0)