20 lines
629 B
Bash
Executable File
20 lines
629 B
Bash
Executable File
#!/bin/bash
|
|
# reflector --list-countries
|
|
|
|
if [ "$(which curl)" != "curl not found" ]; then
|
|
check_country=$(curl -s https://ipinfo.io/country)
|
|
fi
|
|
|
|
if [ "$1" = "-lc" ]; then
|
|
# mirrors -lc
|
|
sudo reflector -c "$check_country" -c "RU" -c "YA" -c "PL" -c "GR" -a 12 -l 50 -f 20 -p https -p http --sort rate --save /etc/pacman.d/mirrorlist
|
|
elif [ "$1" = "-c" ]; then
|
|
# mirrors -c
|
|
sudo reflector -c "$check_country" -f 20 -p https -p http --sort rate --save /etc/pacman.d/mirrorlist
|
|
else
|
|
# mirrors
|
|
sudo reflector --verbose -a 12 -l 50 -f 15 -p https -p http --sort rate --save /etc/pacman.d/mirrorlist
|
|
fi
|
|
|
|
sudo pacman -Syy
|