This script helps automate the process of updating, filtering, and ranking Arch Linux mirrors.
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| update.sh | ||
Arch Linux Mirrorlist Updater
This script helps automate the process of updating, filtering, and ranking Arch Linux mirrors. It ensures that only mirrors from specific countries are selected and provides a backup mechanism to safeguard the previous configuration.
Features
- Downloads the latest Arch Linux mirrorlist.
- Filters mirrors based on specific countries (
Germany,Austria,Switzerland, andWorldwideby default). - Removes comments only from server lines, preserving country headers.
- Ranks the mirrors based on speed and selects the top 6.
- Creates a backup of the current mirrorlist (
/etc/pacman.d/mirrorlist.bak). - Saves the updated mirrorlist to
/etc/pacman.d/mirrorlist.
Requirements
- Arch Linux or a compatible system.
- Root privileges to execute the script.
- The
curlutility to download the mirrorlist. - The
rankmirrorsutility (part of thepacman-contribpackage).
Installation
-
Clone this repository:
git clone https://codeberg.org/Tealk/arch_mirrorlist_updater.git cd arch_mirrorlist_updater -
Make the script executable:
chmod +x update.sh
Usage
Run the script with root privileges:
sudo ./update.sh
The script will:
- Create a backup of the current mirrorlist (
/etc/pacman.d/mirrorlist.bak). - Filter and rank mirrors based on your criteria.
- Save the updated mirrorlist to
/etc/pacman.d/mirrorlist.
Configuration
To adjust the country filter, modify the countries array in the script:
countries=("Germany" "Austria" "Switzerland" "Worldwide")
License
This project is licensed under the AGPL-3.0 License. See the LICENSE file for details.