Created
September 26, 2024 23:17
-
-
Save fakuivan/e0818f37ca9fe1328dc6e8bed53e427b to your computer and use it in GitHub Desktop.
Check if the bedrock dedicated server release contains a pdb file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with_temp_file () { | |
local temp | |
temp="$(mktemp)" | |
trap "rm ${temp@Q}" RETURN | |
"$@" "$temp" | |
} | |
download_has_pdb () { | |
local version="$1" | |
local temp_file="$2" | |
wget -qO"$temp_file" "https://minecraft.azureedge.net/bin-win/bedrock-server-$version.zip" && | |
unzip -l "$temp_file" | grep .pdb | |
} | |
versions=( 1.21.0.20 1.21.0.21 1.21.0.22 1.21.0.23 1.21.0.24 1.21.0.25 1.21.0.26 1.21.1.03 1.21.2.02 1.21.3.01 1.21.10.20 1.21.10.21 1.21.10.22 1.21.10.23 1.21.10.24 1.21.20.21 1.21.20.22 1.21.20.23 1.21.20.24 1.21.22.01 1.21.23.01 ) | |
for version in "${versions[@]}"; do | |
with_temp_file download_has_pdb "$version" | |
exit_code="$?" | |
if [[ "$exit_code" -eq 0 ]]; then | |
echo "Version $version provides pdb!" | |
continue; | |
fi | |
if [[ "$exit_code" -eq 1 ]]; then | |
echo "Version $version does not provide pdb" | |
continue; | |
fi | |
echo "Unable to download $version" | |
done | |
# last version that provides bedrock_server.pdb and bedrock_server_symbols.debug seems to be 1.21.3.01 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment