Skip to content

Instantly share code, notes, and snippets.

@Calinou
Last active November 3, 2021 22:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Calinou/7d6bc16c075d1c39bdcb43e510fed0d6 to your computer and use it in GitHub Desktop.
Save Calinou/7d6bc16c075d1c39bdcb43e510fed0d6 to your computer and use it in GitHub Desktop.
Download files for a given Godot release from the TuxFamily servers (for mirroring purposes)
#!/usr/bin/env bash
# Copyright © 2019-2021 Hugo Locurcio
# Licensed under the MIT license.
set -xeuo pipefail
IFS=$'\n\t'
export DIR
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ "$#" == 0 ]]; then
echo "Usage: ./download-all.sh <major.minor> [extra]"
echo "Example: ./download-all.sh 3.1.2"
echo " ./download-all.sh 3.2 beta2"
exit 1
fi
if [[ -n "${2+x}" ]]; then
# Two arguments passed, it's an alpha/beta/RC version
FOLDER="$1/$2"
SUFFIX="$2"
else
# One argument passed, it's a stable release
FOLDER="$1"
SUFFIX="stable"
fi
mkdir -p "$FOLDER/mono/"
# Download standard binaries
cd "$DIR/$FOLDER/"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/Godot_v$1-${SUFFIX}_export_templates.tpz"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/Godot_v$1-${SUFFIX}_linux_headless.64.zip"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/Godot_v$1-${SUFFIX}_linux_server.64.zip"
# 3.2.3 and older
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/Godot_v$1-${SUFFIX}_osx.64.zip" || true
# 3.2.4 and newer
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/Godot_v$1-${SUFFIX}_osx.universal.zip" || true
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/Godot_v$1-${SUFFIX}_win32.exe.zip"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/Godot_v$1-${SUFFIX}_win64.exe.zip"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/Godot_v$1-${SUFFIX}_x11.32.zip"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/Godot_v$1-${SUFFIX}_x11.64.zip"
# May not exist for stable releases
curl -LO "https://downloads.tuxfamily.org/godotengine/$FOLDER/README.txt"
curl -LO "https://downloads.tuxfamily.org/godotengine/$FOLDER/SHA512-SUMS.txt"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/godot-$1-$SUFFIX.tar.xz"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/godot-$1-$SUFFIX.tar.xz.sha256"
# Download Mono-enabled binaries
cd "$DIR/$FOLDER/mono/"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/mono/Godot_v$1-${SUFFIX}_mono_export_templates.tpz"
# Mono-enabled Linux servers aren't available in 3.1.x
curl -LO "https://downloads.tuxfamily.org/godotengine/$FOLDER/mono/Godot_v$1-${SUFFIX}_mono_linux_headless_64.zip"
curl -LO "https://downloads.tuxfamily.org/godotengine/$FOLDER/mono/Godot_v$1-${SUFFIX}_mono_linux_server_64.zip"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/mono/Godot_v$1-${SUFFIX}_mono_osx.64.zip"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/mono/Godot_v$1-${SUFFIX}_mono_win32.zip"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/mono/Godot_v$1-${SUFFIX}_mono_win64.zip"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/mono/Godot_v$1-${SUFFIX}_mono_x11_32.zip"
curl -fLO "https://downloads.tuxfamily.org/godotengine/$FOLDER/mono/Godot_v$1-${SUFFIX}_mono_x11_64.zip"
# May not always be present
curl -LO "https://downloads.tuxfamily.org/godotengine/$FOLDER/mono/README.txt" || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment