From 7d19bb9ca78ea248ab13db975c0cbc59ba732191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 6 Jul 2023 10:34:05 +0200 Subject: [PATCH] MOBILE-4362 scripts: Change langpack server and follow redirects --- scripts/create_langindex_functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/create_langindex_functions.sh b/scripts/create_langindex_functions.sh index 80d19bae4..bc6eb3c52 100644 --- a/scripts/create_langindex_functions.sh +++ b/scripts/create_langindex_functions.sh @@ -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