fetchmirrors
fetchmirrors copied to clipboard
used shellcheck, some fixes, added new countries, added new support for url query parameter
I used shellcheck to validate the script. see the commits
added new countries
Looks good! Only thing is running default with no options does not work. I'll have to look at it more soon
Can you verify this? When running fetchmirrors without any options it shows usage info and not country select list.
The search function is broken
I will be more than happy to merge this and update on the AUR but the search function needs to be working. One of the problems is the line with: [ -z "$1" ] causes the program not to even use the search section, this line needs to be removed and only the line checking for root left. Beyond that when you enter the search function it fails when you select a country number.
When I invoke fetchmirrors without sudo and without any arguments it shows the (modified) usage info. Or did I get you wrong? my output from the "your" fetchmirror:
Usage: fetchmirrors <opts> <args> Ex: fetchmirrors -q -s 4 -c US
Options:
-c --country
Specify your country code(s): fetchmirrors -c US AU
-d --nocolor
Disable color prompts
-h --help
Display this help message
-l --list
Display list of country codes
-q --noconfirm
Disable confirmation messages
-s --servers
Number of servers to rank (default 6)
-v --verbose
Verbose output
Use fetchmirrors without any option to prompt for country code(s)
my output with "my" fetchmirrors:
Usage: fetchmirrors.sh <opts> <args> Ex: fetchmirrors.sh -q -s 4 -c US
Options:
-c --country
Specify your country code(s): fetchmirrors.sh -c US AU
-d --nocolor
Disable color prompts
-h --help
Display this help message
-l --list
Display list of country codes
-q --noconfirm
Disable confirmation messages
-s --servers
Number of servers to rank (default 6)
-v --verbose
Verbose output
-p --protocol
the protocol to use either http or https, default is empty (both)
-i --ip-version
the ip version to use either 4 or 6, default is empty (both)
-u --use-mirror-status
use mirror status
Use fetchmirrors.sh without any option to prompt for country code(s)
I dont understand what you mean by "The search function is broken", could you provide an sample search term or any further information. ;)
I have recorded my terminal via https://asciinema.org.
the parameterless call. https://asciinema.org/a/5ugAH0aTnlKZdpavY65Z4hdvi the search function. https://asciinema.org/a/YWaPSpCbBhaqsHdg8yhHDjQwZ
Maybe you could do this to, so i can understand what you mean. :)
@deadhead420 could you provide some Information? thank you.