Skip to content

Commit

Permalink
Merge pull request #1157 from cyw3/main
Browse files Browse the repository at this point in the history
🐛 适配低版本的shell写法
  • Loading branch information
bensonhome authored Aug 5, 2024
2 parents 5a60e33 + 97719f4 commit a188866
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 a188866

Please sign in to comment.