Skip to content
Snippets Groups Projects
Commit 40374b3d authored by Sam Thursfield's avatar Sam Thursfield
Browse files

build: Use existing nw.js tarball if present

Previously we would redownload the tarball in all cases, saving it
as nwjs-*.tar.gz.1 or similar.
parent 9e01be4d
No related branches found
No related tags found
No related merge requests found
...@@ -166,17 +166,23 @@ fi ...@@ -166,17 +166,23 @@ fi
# for building with no libs, so we do it regardless of the options # for building with no libs, so we do it regardless of the options
if [ ! -d "../pd/nw/nw" ]; then if [ ! -d "../pd/nw/nw" ]; then
nwjs_filename=$($script_dir/nwjs_version_for_platform.sh) nwjs_filename=$($script_dir/nwjs_version_for_platform.sh)
nwjs_version=$(echo $nwjs_filename | egrep -o 'v[^-]+')
nwjs_url=https://git.purrdata.net/jwilkes/nwjs-binaries/raw/master if [ -e "./$nwjs_filename" ]; then
nwjs_url=${nwjs_url}/$nwjs_filename echo "Found $nwjs_filename"
echo "Fetching the nwjs binary from" else
echo "$nwjs_url" nwjs_version=$(echo $nwjs_filename | egrep -o 'v[^-]+')
if ! wget -nv $nwjs_url; then nwjs_url=https://git.purrdata.net/jwilkes/nwjs-binaries/raw/master
nwjs_url=https://dl.nwjs.io/${nwjs_version}/$nwjs_filename nwjs_url=${nwjs_url}/$nwjs_filename
echo "Fetching the nwjs binary from" echo "Fetching the nwjs binary from"
echo "$nwjs_url" 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
fi fi
if [[ $os == "win" || $os == "win64" || $os == "osx" ]]; then if [[ $os == "win" || $os == "win64" || $os == "osx" ]]; then
unzip $nwjs_filename unzip $nwjs_filename
nwjs_dirname=$(basename --suffix=.zip $nwjs_filename) nwjs_dirname=$(basename --suffix=.zip $nwjs_filename)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment