Skip to content

Commit

Permalink
replace proxy of github release
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Nov 7, 2023
1 parent 4d92d45 commit c2893b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions docs/.vuepress/public/v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ BLUE_COLOR='\e[1;34m'
PINK_COLOR='\e[1;35m'
SHAN='\e[1;33;5m'
RES='\e[0m'
GH_PROXY='https://github.abskoop.workers.dev/'
clear

# Get platform
Expand Down Expand Up @@ -83,7 +84,7 @@ CHECK() {
INSTALL() {
# 下载 Alist 程序
echo -e "\r\n${GREEN_COLOR}下载 Alist v2.6.4 ...${RES}"
curl -L https://ghproxy.com/https://github.com/Xhofe/alist/releases/download/v2.6.4/alist-linux-musl-$ARCH.tar.gz -o /tmp/alist.tar.gz $CURL_BAR
curl -L ${GH_PROXY}https://github.com/Xhofe/alist/releases/download/v2.6.4/alist-linux-musl-$ARCH.tar.gz -o /tmp/alist.tar.gz $CURL_BAR
tar zxf /tmp/alist.tar.gz -C $INSTALL_PATH/

if [ -f $INSTALL_PATH/alist-linux-musl-$ARCH ];then
Expand Down Expand Up @@ -173,7 +174,7 @@ UPDATE() {
# 备份 alist 二进制文件,供下载更新失败回退
cp $INSTALL_PATH/alist /tmp/alist.bak
echo -e "${GREEN_COLOR}下载 Alist v2.6.4 ...${RES}"
curl -L https://ghproxy.com/https://github.com/Xhofe/alist/releases/download/v2.6.4/alist-linux-musl-$ARCH.tar.gz -o /tmp/alist.tar.gz $CURL_BAR
curl -L ${GH_PROXY}https://github.com/Xhofe/alist/releases/download/v2.6.4/alist-linux-musl-$ARCH.tar.gz -o /tmp/alist.tar.gz $CURL_BAR
tar zxf /tmp/alist.tar.gz -C $INSTALL_PATH/
if [ -f $INSTALL_PATH/alist-linux-musl-$ARCH ];then
mv $INSTALL_PATH/alist-linux-musl-$ARCH $INSTALL_PATH/alist
Expand Down
6 changes: 4 additions & 2 deletions docs/.vuepress/public/v3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ elif [ "$platform" = "aarch64" ]; then
ARCH=arm64
fi

GH_PROXY='https://github.abskoop.workers.dev/'

if [ "$(id -u)" != "0" ]; then
echo -e "\r\n${RED_COLOR}出错了,请使用 root 权限重试!${RES}\r\n" 1>&2
exit 1
Expand Down Expand Up @@ -83,7 +85,7 @@ CHECK() {
INSTALL() {
# 下载 Alist 程序
echo -e "\r\n${GREEN_COLOR}下载 Alist $VERSION ...${RES}"
curl -L https://ghproxy.com/https://github.com/Xhofe/alist/releases/latest/download/alist-linux-musl-$ARCH.tar.gz -o /tmp/alist.tar.gz $CURL_BAR
curl -L ${GH_PROXY}https://github.com/xhofe/alist/releases/latest/download/alist-linux-musl-$ARCH.tar.gz -o /tmp/alist.tar.gz $CURL_BAR
tar zxf /tmp/alist.tar.gz -C $INSTALL_PATH/

if [ -f $INSTALL_PATH/alist ]; then
Expand Down Expand Up @@ -189,7 +191,7 @@ UPDATE() {
# 备份 alist 二进制文件,供下载更新失败回退
cp $INSTALL_PATH/alist /tmp/alist.bak
echo -e "${GREEN_COLOR}下载 Alist $VERSION ...${RES}"
curl -L https://ghproxy.com/https://github.com/Xhofe/alist/releases/latest/download/alist-linux-musl-$ARCH.tar.gz -o /tmp/alist.tar.gz $CURL_BAR
curl -L ${GH_PROXY}https://github.com/xhofe/alist/releases/latest/download/alist-linux-musl-$ARCH.tar.gz -o /tmp/alist.tar.gz $CURL_BAR
tar zxf /tmp/alist.tar.gz -C $INSTALL_PATH/
if [ -f $INSTALL_PATH/alist ]; then
echo -e "${GREEN_COLOR} 下载成功 ${RES}"
Expand Down

0 comments on commit c2893b9

Please sign in to comment.