Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI flag to show repo mirror address #855

Open
nebulosa2007 opened this issue Dec 13, 2024 · 1 comment
Open

Add CLI flag to show repo mirror address #855

nebulosa2007 opened this issue Dec 13, 2024 · 1 comment

Comments

@nebulosa2007
Copy link

nebulosa2007 commented Dec 13, 2024

$ pikaur -Vq
Pikaur v1.30.3
Pacman v7.0.0 - libalpm v15.0.0 - pyalpm v0.10.6

Description:

Is it possible to show mirror address while updating bases?

I made a bash alias for myself, it works for years without an issue:

getnews () { echo; echo -ne '\033[0;34m:: \033[0m\033[1mMirror: '; grep -m1 Server /etc/pacman.d/mirrorlist | cut  -d'/' -f3; echo -e '\033[0m'; pikaur -Syu --noedit; }

And it looks like:

$ getnews
:: Mirror: mirror.hugo-betrugo.de

:: Synchronising package databases...
 core is up to date
 extra is up to date
 archrepo is up to date
....

Mirror updates once a day through reflector.

Could you add showing mirror server with -m option?

@actionless
Copy link
Owner

actionless commented Dec 13, 2024

the idea itself sounds a bit weird to me, but i'll leave the issue hanging open for a while to see if it will gain any popularity from other pikaur users

btw your grep expression is not okay:

$ echo -ne '\033[0;34m:: \033[0m\033[1mMirror: '; grep -m1 Server /etc/pacman.d/mirrorlist | cut  -d'/' -f3; echo -e '\033[0m';
:: Mirror: # Server list generated by rankmirrors on 2024-09-28

should be smth like that:

$ echo -ne '\033[0;34m:: \033[0m\033[1mMirror: '; grep -m1 '^[^#]*Server.*=' /etc/pacman.d/mirrorlist | cut  -d'/' -f3; echo -e '\033[0m';
:: Mirror: london.mirror.pkgbuild.com

@actionless actionless changed the title Enhancement: show mirror address (with -m option) Add CLI flag to show repo mirror address Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants