From 7b48a06f95a89f64171cb28087b120f922c2c373 Mon Sep 17 00:00:00 2001
From: Albert Graef <aggraef@gmail.com>
Date: Mon, 5 Aug 2019 10:37:37 +0200
Subject: [PATCH] tar_em_up.sh: Fall back to nwjs.io if nw.js tarball cannot be
 found on git.purrdata.net.

---
 l2ork_addons/tar_em_up.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/l2ork_addons/tar_em_up.sh b/l2ork_addons/tar_em_up.sh
index 3dadc2991..407cf4da8 100755
--- a/l2ork_addons/tar_em_up.sh
+++ b/l2ork_addons/tar_em_up.sh
@@ -200,7 +200,12 @@ if [ ! -d "../pd/nw/nw" ]; then
 	nwjs_url=${nwjs_url}/$nwjs_filename
 	echo "Fetching the nwjs binary from"
 	echo "$nwjs_url"
-	wget -nv $nwjs_url
+	if ! wget -nv $nwjs_url; then
+		nwjs_url=https://dl.nwjs.io/${nwjs_version}/$nwjs_filename
+		echo "Fetching the nwjs binary from"
+		echo "$nwjs_url"
+		wget -nv $nwjs_url
+	fi
 	if [[ $os == "win" || $os == "osx" ]]; then
 		unzip $nwjs_filename
 	else
-- 
GitLab