Skip to content

Commit 5dcb55e

Browse files
committed
fixup: code review comments
1 parent c47eb09 commit 5dcb55e

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ variable. For detailed instructions for each of our supported platforms, please
2323
[installation documentation](https://www.mongodb.com/docs/mongodb-shell/install#mdb-shell-install).
2424

2525
Alternatively:
26-
- Run `npx mongosh` to run mongosh without a full installation.
26+
- Run `npx mongosh` to run mongosh without a full installation. This is
27+
easiest if you already have npm installed.
2728
- Run `download_latest.sh` to download a `mongosh` binary. You can use
28-
this script without cloning the repository thus:
29-
```
29+
the following script:
30+
```sh
3031
curl -fsSL https://raw.githubusercontent.com/mongodb-js/mongosh/refs/heads/main/download_latest.sh | sh
3132
```
3233

download_latest.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,22 @@ case "$arch" in
5656
# Use uname’s reported architecture in the jq query.
5757
esac
5858

59+
if [ "$os" = "linux" ]; then
60+
if ldd $(which curl) | grep -q libssl.so.3 ; then
61+
openssl_query='.sharedOpenssl == "openssl3"'
62+
else
63+
openssl_query='(has("sharedOpenssl") | not)'
64+
fi
65+
else
66+
openssl_query=''
67+
fi
68+
5969
jq_query=$(cat <<EOF
6070
.versions[0].downloads[] |
6171
select(
6272
.distro == "$os" and
6373
.arch == "$arch" and
64-
(has("sharedOpenssl") | not)
74+
$openssl_query
6575
) |
6676
.archive.url
6777
EOF

packages/build/src/download-center/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ export function getUpdatedDownloadCenterConfig(
202202
currentVersions[matchingMajorVersionIdx] = versionConfig;
203203
}
204204

205+
// NB: download_latest.sh depends on the specific ordering of versions here.
205206
currentVersions.sort((a, b) => semver.rcompare(a.version, b.version));
206207

207208
return {

0 commit comments

Comments
 (0)