Skip to content

Commit

Permalink
Version 2.7.4: Replace the download URL for the Aria2 binary
Browse files Browse the repository at this point in the history
  • Loading branch information
P3TERX committed Dec 25, 2020
1 parent 854a5ca commit 992191b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions aria2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# https://github.com/P3TERX/aria2.sh
# Description: Aria2 One-click installation management script
# System Required: CentOS/Debian/Ubuntu
# Version: 2.7.3
# Version: 2.7.4
#

sh_ver="2.7.3"
sh_ver="2.7.4"
export PATH=~/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/sbin:/bin
aria2_conf_dir="/root/.aria2c"
download_path="/root/downloads"
Expand Down Expand Up @@ -77,12 +77,12 @@ check_pid() {
check_new_ver() {
aria2_new_ver=$(
{
wget -t2 -T3 -qO- "https://api.github.com/repos/P3TERX/aria2-builder/releases/latest" ||
wget -t2 -T3 -qO- "https://gh-api.p3terx.com/repos/P3TERX/aria2-builder/releases/latest"
wget -t2 -T3 -qO- "https://api.github.com/repos/P3TERX/Aria2-Pro-Core/releases/latest" ||
wget -t2 -T3 -qO- "https://gh-api.p3terx.com/repos/P3TERX/Aria2-Pro-Core/releases/latest"
} | grep -o '"tag_name": ".*"' | head -n 1 | cut -d'"' -f4
)
if [[ -z ${aria2_new_ver} ]]; then
echo -e "${Error} Aria2 最新版本获取失败,请手动获取最新版本号[ https://github.com/P3TERX/aria2-builder/releases ]"
echo -e "${Error} Aria2 最新版本获取失败,请手动获取最新版本号[ https://github.com/P3TERX/Aria2-Pro-Core/releases ]"
read -e -p "请输入版本号:" aria2_new_ver
[[ -z "${aria2_new_ver}" ]] && echo "取消..." && exit 1
fi
Expand Down Expand Up @@ -116,7 +116,7 @@ Download_aria2() {
echo -e "${Info} 删除旧版 Aria2 二进制文件..."
rm -vf $(which aria2c)
done
DOWNLOAD_URL="https://github.com/P3TERX/aria2-builder/releases/download/${aria2_new_ver}/aria2-${aria2_new_ver%_*}-static-linux-${ARCH}.tar.gz"
DOWNLOAD_URL="https://github.com/P3TERX/Aria2-Pro-Core/releases/download/${aria2_new_ver}/aria2-${aria2_new_ver%_*}-static-linux-${ARCH}.tar.gz"
{
wget -t2 -T3 -O- "${DOWNLOAD_URL}" ||
wget -t2 -T3 -O- "https://gh-acc.p3terx.com/${DOWNLOAD_URL}"
Expand Down

0 comments on commit 992191b

Please sign in to comment.