Skip to content

Commit

Permalink
🐛 适配低版本的shell写法
Browse files Browse the repository at this point in the history
Signed-off-by: cyw3 <[email protected]>
  • Loading branch information
cyw3 committed Aug 2, 2024
1 parent 1fe00bc commit 97719f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/base/install_bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ function downloader() {
user=$2
password=$3
# ${url: -11} 中间要有空格,才能是截取后几位
git clone -b ${url: -11} ${url:0:8}${user}:${password}@${url:8:-12}
# 2024/8/2 适配低版本的shell写法
length=${#url}
git clone -b ${url: -11} ${url:0:8}${user}:${password}@${url:8:length-20}
cmd_ret=$?
if [[ ${cmd_ret} == 0 ]] ; then
# 清理lib中无关文件
Expand Down

0 comments on commit 97719f4

Please sign in to comment.