1
0
Fork 0
This script helps automate the process of updating, filtering, and ranking Arch Linux mirrors.
This repository has been archived on 2025-10-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
2024-11-18 12:55:43 +01:00
.gitignore init 2024-11-18 12:55:43 +01:00
LICENSE init 2024-11-18 12:55:43 +01:00
README.md init 2024-11-18 12:55:43 +01:00
update.sh init 2024-11-18 12:55:43 +01:00

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, and Worldwide by 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 curl utility to download the mirrorlist.
  • The rankmirrors utility (part of the pacman-contrib package).

Installation

  1. Clone this repository:

    git clone https://codeberg.org/Tealk/arch_mirrorlist_updater.git
    cd arch_mirrorlist_updater
    
  2. 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.