You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
811 B

4 years ago
game_mirrors_file=game_mirrors
sdk_mirrors_file=sdk_mirrors
4 years ago
static_path="/home/renx/static.renegade-x.com/"
version_path="${static_path}/data/launcher_data/version"
update_mirrors() {
version_file=${version_path}/$1
# Update game mirrors
4 years ago
game_mirrors=$(cat "${game_mirrors_file}")
jq ".game.mirrors = ${game_mirrors}" "${version_file}" > "$version_file.tmp" && mv "${version_file}.tmp" "${version_file}"
# Update SDK mirrors
sdk_mirrors=$(cat "${sdk_mirrors_file}")
jq ".sdk.mirrors = ${sdk_mirrors}" "${version_file}" > "$version_file.tmp" && mv "${version_file}.tmp" "${version_file}"
4 years ago
}
# Release branches
update_mirrors release.json
# Staging branches
update_mirrors beta.json
# Temporary / Alpha testing branches
update_mirrors alpha.json
update_mirrors launcher.json
update_mirrors sdk.json