Skip to content

Commit 4a678ac

Browse files
committed
Do not redownload mongodb if we have it already
Makes running this on localhost annoying :)
1 parent 6e86dcb commit 4a678ac

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.evergreen/download-mongodb.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,15 @@ download_and_extract ()
231231
MONGODB_DOWNLOAD_URL=$1
232232
EXTRACT=$2
233233

234-
curl --retry 5 $MONGODB_DOWNLOAD_URL --silent --max-time 120 --fail --output mongodb-binaries.tgz
234+
if ! test -d mongodb -a -x mongodb/bin/mongod; then
235+
curl --retry 5 $MONGODB_DOWNLOAD_URL --silent --max-time 120 --fail --output mongodb-binaries.tgz
235236

236-
$EXTRACT mongodb-binaries.tgz
237+
$EXTRACT mongodb-binaries.tgz
237238

238-
rm -rf mongodb*tgz mongodb/
239-
mv mongodb* mongodb
240-
chmod -R +x mongodb
241-
find . -name vcredist_x64.exe -exec {} /install /quiet \;
239+
rm -rf mongodb*tgz mongodb/
240+
mv mongodb* mongodb
241+
chmod -R +x mongodb
242+
find . -name vcredist_x64.exe -exec {} /install /quiet \;
243+
fi
242244
./mongodb/bin/mongod --version
243245
}

0 commit comments

Comments
 (0)