Skip to content

Commit 51d9449

Browse files
authored
Merge pull request #98 from algorandfoundation/fix/install-sh-wget-alternative
chore: install.sh to test for curl, otherwise use wget
2 parents 3270dc2 + 27dcf54 commit 51d9449

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

install.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ target="nodekit-$platform"
8888
url="$release/$target"
8989

9090
echo -e "${Opaque}Downloading:${Reset}${Bold_White} $target ${Reset}from $url"
91-
curl --fail --location --progress-bar --output nodekit "$url" ||
92-
error "Failed to download ${target} from ${release} ${url}"
91+
errormessage="Failed to download ${target} from ${release} ${url}"
92+
if curl --version > /dev/null 2>&1; then
93+
curl --fail --location --progress-bar --output nodekit "$url" || error "$errormessage"
94+
else
95+
wget -qO nodekit --show-progress "$url" || error "$errormessage"
96+
fi
9397

9498
chmod +x nodekit
9599

0 commit comments

Comments
 (0)