minetest-mapserver: fix download of binary

This commit is contained in:
Starbeamrainbowlabs 2022-11-06 18:01:05 +00:00
parent 4bc7e9b370
commit c54852d143
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -1,9 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# The architecture - possible values: arm (default), x86, x86_64 # The architecture - possible values: arm (default), x86, x86_64
arch="${arch:-arm}"; # arch="${arch:-arm}";
download_url="https://github.com/minetest-mapserver/mapserver/releases/latest/download/mapserver-linux-${arch}";
# download_url="https://github.com/minetest-mapserver/mapserver/releases/latest/download/mapserver-linux-${arch}";
download_url="$(curl -sSL https://api.github.com/repos/minetest-mapserver/mapserver/releases/58437588/assets | jq --raw-output '.[] | select(.browser_download_url | contains("_armv")) | .url' | head -n1)";
# The registry to push to # The registry to push to
DOCKER_REGISTRY="${DOCKER_REGISTRY:-registry.service.mooncarrot.space:5000/}"; DOCKER_REGISTRY="${DOCKER_REGISTRY:-registry.service.mooncarrot.space:5000/}";
@ -39,7 +41,8 @@ log_msg() {
log_msg "Downloading mapserver"; log_msg "Downloading mapserver";
curl -sSL -o "${temp_dir}/mapserver" "${download_url}" curl -sSL -o "${temp_dir}/mapserver.tar.gz" "${download_url}";
tar -xf "${temp_dir}/mapserver.tar.gz" -C "${temp_dir}";
chmod +x "${temp_dir}/mapserver"; chmod +x "${temp_dir}/mapserver";