MOBILE-4362 scripts: Change langpack server and follow redirects

main
Pau Ferrer Ocaña 2023-07-06 10:34:05 +02:00
parent 4e2cb51c53
commit 7d19bb9ca7
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
# Functions used to create langidex.
#
SERVER_URL='https://download.moodle.org/'
SERVER_URL='https://packaging.moodle.org/'
# Downloads a file and if it's a zip file, unzip it.
function download_file {
@ -12,7 +12,7 @@ function download_file {
pushd "$LANGPACKS_PATH" > /dev/null
curl -s "$url" --output "$filename" > /dev/null
curl -L -s "$url" --output "$filename" > /dev/null
size=$(du -k "$filename" | cut -f 1)
if [ ! -n "$filename" ] || [ "$size" -le 1 ]; then
echo "Wrong or corrupt file $filename"
@ -45,7 +45,7 @@ function get_english {
get_app_version
echo "Getting English language..."
download_file "$SERVER_URL/download.php/direct/langpack/$LANGVERSION/en.zip"
download_file "$SERVER_URL/langpack/$LANGVERSION/en.zip"
}
#Saves or updates a key on langindex_old.json