Procházet zdrojové kódy

Version 2.7.4: Replace the download URL for the Aria2 binary

master
P3TERX před 3 roky
rodič
revize
992191bac3
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: F62C168888888888
1 změnil soubory, kde provedl 6 přidání a 6 odebrání
  1. +6
    -6
      aria2.sh

+ 6
- 6
aria2.sh Zobrazit soubor

@ -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"
@ -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
@ -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}"

Načítá se…
Zrušit
Uložit