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

[DoNotMerge] fix/nwjs timeout #26

Open
wants to merge 2 commits into
base: mojin-devel
Choose a base branch
from
Open
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
12 changes: 8 additions & 4 deletions bin/nwjs_install
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ echo "Downloading nwjs..."
set +e
if [ "$ARCH" == "arm64" ]; then
main_uri="https://github.com/LeonardLaszlo/nw.js-armv7-binaries/releases/download/nw60-arm64_2022-01-08/nw60-arm64_2022-01-08.tar.gz"
curl -sL -o $TEMPFILE $main_uri
curl --max-time 10 -sL -o $TEMPFILE $main_uri
status=$?
if [ $status -ne 0 ] ; then
echo "Failed to download '$main_uri': $status"
Expand All @@ -53,17 +53,21 @@ if [ "$ARCH" == "arm64" ]; then
rm -rf docker
else
main_uri="https://dl.nwjs.io/$VERSION/nwjs-$VERSION-$OS-$ARCH.tar.gz"
curl -sL -o $TEMPFILE $main_uri
curl --max-time 10 -sL -o $TEMPFILE $main_uri
status=$?
if [ $status -ne 0 ] ; then
echo "Failed to download '$main_uri': $status"
echo "Using mirror instead..."
mirror_uri="https://npm.taobao.org/mirrors/nwjs/$VERSION/nwjs-$VERSION-$OS-$ARCH.tar.gz"
curl -sL -o $TEMPFILE $mirror_uri
curl --max-time 10 -sL -o $TEMPFILE $mirror_uri
status=$?
if [ $status -ne 0 ] ; then
echo "Failed to download '$mirror_uri': $status"
exit "$status"
echo "using local download $LOCAL_DOWNLOAD"
echo "$PWD"
#exit "$status"
LOCAL_DOWNLOAD="nwjs-$VERSION-$OS-$ARCH.tar.gz"
cp -f "$LOCAL_DOWNLOAD" $TEMPFILE
fi
fi
fi
Expand Down