Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix downloading of windows zip releases #308

Closed
wants to merge 1 commit into from
Closed
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
25 changes: 18 additions & 7 deletions tools/download-oxen-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Usage: $0 URL -- download and extract an oxen-core build (typically from https:/

Some common URLs:
https://oxen.rocks/oxen-io/oxen-core/oxen-stable-linux-LATEST.tar.xz
https://oxen.rocks/oxen-io/oxen-core/oxen-stable-win-LATEST.tar.xz
https://oxen.rocks/oxen-io/oxen-core/oxen-stable-win-LATEST.zip
https://oxen.rocks/oxen-io/oxen-core/oxen-stable-macos-LATEST.tar.xz

https://oxen.rocks/oxen-io/oxen-core/oxen-dev-linux-LATEST.tar.xz
https://oxen.rocks/oxen-io/oxen-core/oxen-dev-win-LATEST.tar.xz
https://oxen.rocks/oxen-io/oxen-core/oxen-dev-win-LATEST.zip
https://oxen.rocks/oxen-io/oxen-core/oxen-dev-macos-LATEST.tar.xz
EOF
exit 1
Expand All @@ -33,8 +33,19 @@ fi

rm -f bin/oxen*

curl -sS "$1" | $tar --strip-components=1 -C bin -xJv --no-anchored oxend oxen-wallet-rpc

echo "Checking downloaded versions:"
echo -n "oxend: "; ./bin/oxend --version
echo -n "oxen-wallet-rpc: "; ./bin/oxen-wallet-rpc --version
if [[ "$1" = *win*.zip ]]; then
tmpzip=$(mktemp XXXXXXXXXXXX.zip)
curl -sSo $tmpzip "$1"
unzip -p $tmpzip '*/oxend.exe' >bin/oxend.exe
unzip -p $tmpzip '*/oxen-wallet-rpc.exe' >bin/oxen-wallet-rpc.exe
rm -f $tmpzip

echo "Extracted:"
ls -l bin/*.exe
else
curl -sS "$1" | $tar --strip-components=1 -C bin -xJv --no-anchored oxend oxen-wallet-rpc

echo "Checking downloaded versions:"
echo -n "oxend: "; ./bin/oxend --version
echo -n "oxen-wallet-rpc: "; ./bin/oxen-wallet-rpc --version
fi