File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ set -o errexit
44
55MONGOSH_RELEASES_URL=https://downloads.mongodb.com/compass/mongosh.json
66
7+ show_download_link () {
8+ echo >&2 " Download mongosh manually from:"
9+ echo >&2
10+ printf >&2 " \t%s\n" , ' https://www.mongodb.com/try/download/shell'
11+ }
12+
713for tool in jq curl; do
814 which " $tool " > /dev/null || {
915 echo >&2 " This script requires '$tool '."
@@ -23,7 +29,9 @@ case "$os" in
2329 ext=zip
2430 ;;
2531 * )
26- echo >&2 " This script does not support this OS ($os ). Download mongosh manually."
32+ echo >&2 " ❌ This script does not support this OS ($os )."
33+ show_download_link
34+
2735 exit 1
2836esac
2937
5361url=$( curl -fsSL $MONGOSH_RELEASES_URL | jq -r " $jq_query " )
5462
5563if [ -z " $url " ]; then
56- echo >&2 " No download found for $os on $arch ; download manually."
64+ echo >&2 " ❓ No download found for $os on $arch ."
65+ show_download_link
5766 exit 1
5867fi
5968
@@ -80,7 +89,8 @@ case "$ext" in
8089 ;;
8190 * )
8291 echo >&2 " Bad file extension: $ext "
92+ show_download_link
8393 exit 1
8494esac
8595
86- echo " Success! 'mongosh' and its crypto library are now saved in this directory."
96+ echo " ✅ Success! 'mongosh' and its crypto library are now saved in this directory."
You can’t perform that action at this time.
0 commit comments