fetchmirrors icon indicating copy to clipboard operation
fetchmirrors copied to clipboard

used shellcheck, some fixes, added new countries, added new support for url query parameter

Open YoshiMan opened this issue 7 years ago • 7 comments

I used shellcheck to validate the script. see the commits

added new countries

YoshiMan avatar Nov 22 '17 20:11 YoshiMan

Looks good! Only thing is running default with no options does not work. I'll have to look at it more soon

deadhead420 avatar Nov 28 '17 00:11 deadhead420

Can you verify this? When running fetchmirrors without any options it shows usage info and not country select list.

deadhead420 avatar Nov 28 '17 01:11 deadhead420

The search function is broken

deadhead420 avatar Nov 28 '17 14:11 deadhead420

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.

deadhead420 avatar Nov 28 '17 14:11 deadhead420

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)

YoshiMan avatar Nov 28 '17 17:11 YoshiMan

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. :)

YoshiMan avatar Nov 29 '17 20:11 YoshiMan

@deadhead420 could you provide some Information? thank you.

YoshiMan avatar Dec 05 '17 21:12 YoshiMan