fix mongo download link for 4.2 4.4 explicitly

This commit is contained in:
Bastien Gerard
2021-03-03 11:40:39 +01:00
parent 0620ac5641
commit f244207168
5 changed files with 15 additions and 10 deletions

View File

@@ -5,11 +5,14 @@ MONGODB=$1
# Mongo > 4.0 follows different name convention for download links
mongo_build=mongodb-linux-x86_64-${MONGODB}
if [[ "$MONGODB" == *"4."* ]] && [[ ! "$MONGODB" == *"4.0"* ]]; then
echo "It's there."
mongo_build=mongodb-linux-x86_64-ubuntu2004-v${MONGODB}-latest
if [[ "$MONGODB" == *"4.2"* ]]; then
mongo_build=mongodb-linux-x86_64-ubuntu1804-v${MONGODB}-latest
elif [[ "$MONGODB" == *"4.4"* ]]; then
mongo_build=mongodb-linux-x86_64-ubuntu1804-v${MONGODB}-latest
fi
wget http://fastdl.mongodb.org/linux/$mongo_build.tgz
tar xzf $mongo_build.tgz
${PWD}/$mongo_build/bin/mongod --version
mongodb_dir=$(find ${PWD}/ -type d -name "mongodb-linux-x86_64*")
$mongodb_dir/bin/mongod --version