diff options
author | plokid | 2023-02-13 18:29:18 +0800 |
---|---|---|
committer | plokid | 2023-02-13 18:29:18 +0800 |
commit | 9f78bedf6e90e8dc524f0df458a05aeb0dc55929 (patch) | |
tree | 6ae483254a7e7fa3c068221c79f43dc5a5969299 /start.sh | |
parent | b53fa7dcae026f299c8372cb9d4662c2c1793951 (diff) | |
download | aur-9f78bedf6e90e8dc524f0df458a05aeb0dc55929.tar.gz |
使用aria2替换axel,用install脚本修改makepkg.conf
Diffstat (limited to 'start.sh')
-rwxr-xr-x | start.sh | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -1,21 +1,16 @@ #! /bin/bash -# 该脚本用于处理yay安装软件时,由github下载缓慢甚至无法下载的问题 -# 检测域名是不是github,如果是,则替换为镜像网站,依旧使用curl下载 -# 如果不是github则采用axel代替curl进行15线程下载 -# 实验用链接: -# https://download.fastgit.org/beekeeper-studio/beekeeper-studio/releases/download/v1.6.11/beekeeper-studio_1.6.11_amd64.deb -# https://github.com/beekeeper-studio/beekeeper-studio/releases/download/v1.6.11/beekeeper-studio_1.6.11_amd64.deb +# 该脚本用于处理aur安装软件时,由github下载缓慢甚至无法下载的问题 domin=`echo $2 | cut -f3 -d'/'`; others=`echo $2 | cut -f4- -d'/'`; case "$domin" in "github.com") - url="https://download.fastgit.org/"$others; + url="https://ghproxy.com/https://github.com/"$others; echo "download from github mirror $url"; - /usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o $1 $url; + /usr/bin/aria2c -x 16 -s 8 -k 1M -o $1 $url; ;; *) url=$2; - /usr/bin/axel -n 15 -a -o $1 $url; + /usr/bin/aria2c -x 16 -s 8 -k 1M -o $1 $url; ;; esac |