Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
VVAS-Match
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d48deae5
authored
Nov 18, 2025
by
文帅营
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
ci: 更新docker配置参数
1 parent
65068e8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
build/package-docker.sh
build/package-docker.sh
View file @
d48deae
...
@@ -58,22 +58,24 @@ replace_vars_in_file() {
...
@@ -58,22 +58,24 @@ replace_vars_in_file() {
# read -r读不到最后一行,需要手动增加一个空行
# read -r读不到最后一行,需要手动增加一个空行
printf
'\n'
>>
"
$template_file
"
printf
'\n'
>>
"
$template_file
"
# 逐行处理模板文件
# 逐行处理模板文件
while
IFS
=
read
-r line;
do
while
IFS
=
read
-r line;
do
while
[[
"
$line
"
=
~
$var_pattern
]]
;
do
search_line
=
"
$line
"
var_spec
=
"
${
BASH_REMATCH
[1]
}
"
while
[[
"
$search_line
"
=
~
$var_pattern
]]
;
do
if
[[
"
$var_spec
"
=
~ ^
(
.
*
)
:
(
.
*
)
$
]]
;
then
var_spec
=
"
${
BASH_REMATCH
[1]
}
"
var_name
=
"
${
BASH_REMATCH
[1]
}
"
if
[[
"
$var_spec
"
=
~ ^
(
.
*
)
:
(
.
*
)
$
]]
;
then
default_val
=
"
${
BASH_REMATCH
[2]
}
"
var_name
=
"
${
BASH_REMATCH
[1]
}
"
value
=
"
${
!var_name
:-
$default_val
}
"
default_val
=
"
${
BASH_REMATCH
[2]
}
"
else
value
=
"
${
!var_name
:-
$default_val
}
"
var_name
=
"
$var_spec
"
else
value
=
"
${
!var_name
:-
""
}
"
var_name
=
"
$var_spec
"
fi
value
=
"
${
!var_name
:-
""
}
"
line
=
"
${
line
//\
$\
{
$var_spec
\
}
/
$value
}"
fi
done
line
=
"
${
line
//\
$\
{
$var_spec
\
}
/
$value
}"
echo
"
$line
"
search_line
=
"
${
search_line
//\
$\
{
$var_spec
\
}
/PLACEHOLDER}"
done
<
"
$template_file
"
>
"
$output_file
"
done
echo
"
$line
"
done
<
"
$template_file
"
>
"
$output_file
"
sed -i
's/\r$//'
$output_file
sed -i
's/\r$//'
$output_file
# 如果是临时文件情况,移动回原位置
# 如果是临时文件情况,移动回原位置
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment