Skip to content

Commit 8a2a6d3

Browse files
authored
Merge pull request #785 from ipedrazas/chrore/swap-wget-curl
Swap wget for curl to be consistent with docs
2 parents b316f47 + c0b2c04 commit 8a2a6d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/downloads/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ while [[ $# -gt 0 ]]; do
6666
done
6767

6868
# Check all required utilities are available
69-
require wget
69+
require curl
7070
require tar
7171
require uname
7272

@@ -106,7 +106,7 @@ esac
106106

107107
# Check desired version. Default to latest if no desired version was requested
108108
if [[ $VERSION = "" ]]; then
109-
VERSION=$(wget -qO- https://github.com/fermyon/spin/releases | grep 'href="/fermyon/spin/releases/tag/v[0-9]*.[0-9]*.[0-9]*\"' | sed -E 's/.*\/fermyon\/spin\/releases\/tag\/(v[0-9\.]+)".*/\1/g' | head -1)
109+
VERSION=$(curl -so- https://github.com/fermyon/spin/releases | grep 'href="/fermyon/spin/releases/tag/v[0-9]*.[0-9]*.[0-9]*\"' | sed -E 's/.*\/fermyon\/spin\/releases\/tag\/(v[0-9\.]+)".*/\1/g' | head -1)
110110
fi
111111

112112
# Constructing download FILE and URL
@@ -115,7 +115,7 @@ URL="https://github.com/fermyon/spin/releases/download/${VERSION}/${FILE}"
115115

116116
# Download file, exit if not found - e.g. version does not exist
117117
fancy_print 0 "Step 1: Downloading: ${URL}"
118-
wget -q $URL || (fancy_print 1 "The requested file does not exist: ${FILE}"; exit 1)
118+
curl -sOL --fail $URL || (fancy_print 1 "The requested file does not exist: ${FILE}"; exit 1)
119119
fancy_print 0 "Done...\n"
120120

121121
# Decompress the file

0 commit comments

Comments
 (0)