File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
# 仓库名称
4
- repository=" labring-actions/sync-aliyun "
4
+ repository=" labring-actions/repos "
5
5
6
6
# 获取最新release的版本号
7
7
latest_release=$( curl -s " https://api.github.com/repos/$repository /releases/latest" | grep ' "tag_name":' | sed -E ' s/.*"([^"]+)".*/\1/' )
8
8
# 构建下载链接
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"
10
10
11
11
# 下载最新release
12
12
wget $download_url
13
13
14
14
# 解压缩下载的文件(如果是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
16
16
17
17
# 删除压缩包
18
- rm -rf sync-aliyun_ ${latest_release# v} _linux_amd64.tar.gz
18
+ rm -rf repos_ ${latest_release# v} _linux_amd64.tar.gz
19
19
20
- chmod a+x sync-aliyun
20
+ chmod a+x repos
21
21
22
22
mkdir " /tmp"
23
23
24
- mv sync-aliyun " /tmp"
24
+ mv srepos " /tmp"
You can’t perform that action at this time.
0 commit comments