Skip to content

Commit

Permalink
MOBILE-4362 scripts: Change langpack server and follow redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyserver committed Jul 7, 2023
1 parent 4e2cb51 commit 7d19bb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/create_langindex_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7d19bb9

Please sign in to comment.