Skip to content

Commit b805e79

Browse files
committed
init commit
Signed-off-by: cuisongliu <cuisongliu@qq.com>
1 parent ecd643f commit b805e79

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

download.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
#!/bin/bash
22

33
# 仓库名称
4-
repository="labring-actions/sync-aliyun"
4+
repository="labring-actions/repos"
55

66
# 获取最新release的版本号
77
latest_release=$(curl -s "https://api.github.com/repos/$repository/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
88
# 构建下载链接
9-
download_url="https://github.com/$repository/releases/download/$latest_release/sync-aliyun_${latest_release#v}_linux_amd64.tar.gz"
9+
download_url="https://github.com/$repository/releases/download/$latest_release/repos_${latest_release#v}_linux_amd64.tar.gz"
1010

1111
# 下载最新release
1212
wget $download_url
1313

1414
# 解压缩下载的文件(如果是tar.gz格式)
15-
tar -zxvf sync-aliyun_${latest_release#v}_linux_amd64.tar.gz sync-aliyun
15+
tar -zxvf repos_${latest_release#v}_linux_amd64.tar.gz repos
1616

1717
# 删除压缩包
18-
rm -rf sync-aliyun_${latest_release#v}_linux_amd64.tar.gz
18+
rm -rf repos_${latest_release#v}_linux_amd64.tar.gz
1919

20-
chmod a+x sync-aliyun
20+
chmod a+x repos
2121

2222
mkdir "/tmp"
2323

24-
mv sync-aliyun "/tmp"
24+
mv srepos "/tmp"

0 commit comments

Comments
 (0)