Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
allow wget in elastic-dotnet-auto-install.sh
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
codefromthecrypt committed Mar 6, 2025
commit 736a9eb75983edf57c18ae894087226721cff0a2
11 changes: 10 additions & 1 deletion build/patch-dotnet-auto-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ case "$ARCHITECTURE" in
;;
esac

if command -v curl > /dev/null 2>&1; then
DOWNLOADER="curl -sSfLo"
elif command -v wget > /dev/null 2>&1; then
DOWNLOADER="wget -qO"
else
echo "Error: Neither curl nor wget is available." >&2
exit 1
fi

test -z "$OTEL_DOTNET_AUTO_HOME" && OTEL_DOTNET_AUTO_HOME="$HOME/.otel-dotnet-auto"
test -z "$VERSION" && VERSION="v1.9.0"

Expand All @@ -64,7 +73,7 @@ if [ ! -f "${LOCAL_PATH}" ]; then
(
cd "$DOWNLOAD_DIR"
echo "Downloading $VERSION for $OS_TYPE ($LOCAL_PATH)..."
curl -sSfLo "$LOCAL_PATH" "$RELEASES_URL/download/$VERSION/$ARCHIVE"
${DOWNLOADER} "$LOCAL_PATH" "$RELEASES_URL/download/$VERSION/$ARCHIVE"
)
else
echo "Using local installation archive: $LOCAL_PATH"
Expand Down