From 75186d842f965d02f90720cc77a59457cbd7e9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Sun, 7 Jun 2020 21:36:14 +0200 Subject: [PATCH] Added pacmanupdate and modified pacman-update Added pacmanupdate script, which uses reflector to update mirrors using country from user input and modified pacman-update to use variable at begining of the file so you won't have to type your country all the time --- aliasrc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/aliasrc b/aliasrc index acde730..6de9a3e 100644 --- a/aliasrc +++ b/aliasrc @@ -1,3 +1,6 @@ +##pacman-update country +country=CZ + # # # ex - archive extractor # # usage: ex @@ -24,9 +27,21 @@ ex () fi } +test () +{ +echo test; +} + +pacmanupdate () +{ + echo "Enter your country (like 'US' or 'CZ')" + read update + sudo reflector -c $update -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist; +} + export EDITOR=nano -alias pacman-update='sudo reflector -c "CZ" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist' +alias pacman-update='sudo reflector -c $country -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist' alias ls='ls --color=auto' alias ll='ls -l'