瀏覽代碼

bashrc: update reflector function

pull/1/head
10sr 11 年之前
父節點
當前提交
89bba2cd66
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -2
      bashrc

+ 3
- 2
bashrc 查看文件

@@ -238,11 +238,12 @@ null type pacmatic && {

_pacman_update_mirrorlist_with_reflector(){
ml=/etc/pacman.d/mirrorlist
cmd="$(expr "$(grep reflector $ml)" : '# With: *\(.*\)')"
cmd="$(expr "$(grep -m 1 reflector $ml)" : '# With: *\(.*\)')"
if test -z "$cmd"
then
cmd="reflector --verbose -l 5 --sort rate --save /etc/pacman.d/mirrorlist"
cmd="reflector --verbose -l 5 --sort rate --save $ml"
fi
echo "Running $cmd ..." 1>&2
sudo $cmd
}
null type reflector && test -f /etc/pacman.d/mirrorlist && \


Loading…
取消
儲存