Use reflector instead of a custom script
This commit is contained in:
parent
a8cadd898c
commit
4bc35ac815
2 changed files with 1 additions and 32 deletions
|
@ -9,6 +9,7 @@ This is just a bunch of dotfiles.
|
||||||
# Base utils
|
# Base utils
|
||||||
pacman -S bat duf eza htop inetutils kitty-terminfo neovim openssh ripgrep tmux transmission-cli tree wget whois zsh zsh-syntax-highlighting
|
pacman -S bat duf eza htop inetutils kitty-terminfo neovim openssh ripgrep tmux transmission-cli tree wget whois zsh zsh-syntax-highlighting
|
||||||
pacman -S shared-mime-info xdg-user-dirs
|
pacman -S shared-mime-info xdg-user-dirs
|
||||||
|
pacman -S reflector
|
||||||
pacman -S skim
|
pacman -S skim
|
||||||
# Rust
|
# Rust
|
||||||
pacman -S cargo-audit cargo-outdated cargo-release rustup
|
pacman -S cargo-audit cargo-outdated cargo-release rustup
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
|
|
||||||
pacman_dir="/etc/pacman.d"
|
|
||||||
mirror_file="${pacman_dir}/mirrorlist"
|
|
||||||
mirror_pacnew="${mirror_file}.pacnew"
|
|
||||||
mirror_orig="${mirror_file}.orig"
|
|
||||||
mirror_tmp="/tmp/mirrorlist.tmp"
|
|
||||||
rank_util="rankmirrors"
|
|
||||||
|
|
||||||
if ! hash "$rank_util" 2>/dev/null; then
|
|
||||||
echo "$rank_util: command not found" >&2
|
|
||||||
echo "You may need to install the 'pacman-contrib' package." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$mirror_pacnew" ]; then
|
|
||||||
echo "Using $mirror_pacnew"
|
|
||||||
mv "$mirror_pacnew" "$mirror_orig"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "$mirror_orig" ]; then
|
|
||||||
echo "$mirror_orig: file not found" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
awk '/^## France$/{f=1}f==0{next}/^$/{exit}{print substr($0, 2)}' "$mirror_orig" >"$mirror_tmp"
|
|
||||||
"$rank_util" -n 6 "$mirror_tmp" >"$mirror_file"
|
|
||||||
rm -f "$mirror_tmp"
|
|
||||||
pacman -Syy
|
|
Loading…
Reference in a new issue