Skip to content

Commit 97719f4

Browse files
committed
🐛 适配低版本的shell写法
Signed-off-by: cyw3 <2927096163@qq.com>
1 parent 1fe00bc commit 97719f4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/base/install_bin.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ function downloader() {
3939
user=$2
4040
password=$3
4141
# ${url: -11} 中间要有空格,才能是截取后几位
42-
git clone -b ${url: -11} ${url:0:8}${user}:${password}@${url:8:-12}
42+
# 2024/8/2 适配低版本的shell写法
43+
length=${#url}
44+
git clone -b ${url: -11} ${url:0:8}${user}:${password}@${url:8:length-20}
4345
cmd_ret=$?
4446
if [[ ${cmd_ret} == 0 ]] ; then
4547
# 清理lib中无关文件

0 commit comments

Comments
 (0)