From d399e1de3b30750f96403d607745441c6dbd2bea Mon Sep 17 00:00:00 2001 From: Adam <24621027+WhiteDopeOnPunk@users.noreply.github.com> Date: Sat, 17 Feb 2024 20:03:35 -0500 Subject: [PATCH] add mirror ranking --- bin/mirrors | 17 +++++++++++++++++ scripts/install_arch | 1 + 2 files changed, 18 insertions(+) create mode 100755 bin/mirrors diff --git a/bin/mirrors b/bin/mirrors new file mode 100755 index 0000000..54ba47b --- /dev/null +++ b/bin/mirrors @@ -0,0 +1,17 @@ +#!/bin/sh + +. /etc/os-release +OS=$NAME + +case "$OS" in + "Arch Linux") + rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist + ;; + "Arch Linux ARM") + rate-mirrors archarm | sudo tee /etc/pacman.d/mirrorlist + ;; + *) + echo "$OS is not supported by this script at this time." + exit 1 + ;; +esac diff --git a/scripts/install_arch b/scripts/install_arch index 171464e..4fae0c2 100755 --- a/scripts/install_arch +++ b/scripts/install_arch @@ -47,6 +47,7 @@ if [ "$1" -ge 1 ]; then npm \ oh-my-zsh-git \ python-pywal \ + rate-mirrors \ ripgrep \ rsync \ rubygems \