-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into renovate/kube-prometheus-stack-62.x
- Loading branch information
Showing
12 changed files
with
140 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
function on_exit() { | ||
local exit_code=$? | ||
rm -f /tmp/xpi_files.txt | ||
exit $exit_code | ||
} | ||
trap on_exit EXIT ERR | ||
|
||
# Script is used to download language packs for a specific version of Firefox. | ||
# It requires the version number as the first argument and the target directory as the second argument. | ||
|
||
VERSION=${1:-$(firefox --version | awk '{print $3}')} | ||
TARGET_DIR="${2:-$(dirname $(readlink -f $(which firefox)))/distribution/extensions}" | ||
BASE_URL="https://ftp.mozilla.org/pub/firefox/releases/$VERSION/linux-x86_64/xpi/" | ||
|
||
# Create target directory if it doesn't exist | ||
mkdir -p "${TARGET_DIR}" | ||
|
||
# Download the list of files | ||
wget -q -O - "${BASE_URL}" | grep -oP '(?<=href=")[^"]*.xpi' >/tmp/xpi_files.txt | ||
|
||
echo "Downloading language packs for Firefox version $VERSION to $TARGET_DIR ..." | ||
|
||
# Loop through each file and download it | ||
while IFS= read -r file; do | ||
file=$(basename "${file}") | ||
echo "Downloading "${BASE_URL}${file}" ..." | ||
curl -sk -o "${TARGET_DIR}/${file}" "${BASE_URL}${file}" | ||
target_file="${TARGET_DIR}/langpack-${file%.xpi}@firefox.mozilla.org.xpi" | ||
mv "${TARGET_DIR}/${file}" "${target_file}" | ||
if [ -f "${target_file}" ]; then | ||
echo "Downloaded ${target_file}" | ||
fi | ||
done </tmp/xpi_files.txt | ||
|
||
echo "All language packs are downloaded to $TARGET_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters