Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
songlinfeng
container-toolkit
Commits
1c6f14cf
Commit
1c6f14cf
authored
Dec 01, 2025
by
songlf
Browse files
optimize build.sh
parent
eb14ad41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
build.sh
build.sh
+5
-4
No files found.
build.sh
View file @
1c6f14cf
...
...
@@ -12,15 +12,16 @@ fi
# 解压并安装Go工具链,添加错误处理
unzip
-q
v0.0.1-go1.24.6.linux-amd64.zip
||
{
echo
"Error: 解压Go工具链失败"
>
&2
;
exit
1
;
}
# 使用-T选项确保目录正确替换而非嵌套
if
[
-d
/usr/local
/go
]
;
then
rm
-rf
/usr/local
/go
if
[
-d
${
HOME
}
/go
]
;
then
rm
-rf
${
HOME
}
/go
fi
mv
-T
golang.org/toolchain@v0.0.1-go1.24.6.linux-amd64/
/usr/local
/go
||
{
echo
"Error: 移动Go工具链失败"
>
&2
;
exit
1
;
}
export
PATH
=
/usr/local
/go/bin:
$PATH
mv
-T
golang.org/toolchain@v0.0.1-go1.24.6.linux-amd64/
${
HOME
}
/go
||
{
echo
"Error: 移动Go工具链失败"
>
&2
;
exit
1
;
}
export
PATH
=
${
HOME
}
/go/bin:
$PATH
make cmds
source
=(
"dcu-container-runtime"
"dcu-cdi-hook"
"dcu-ctk"
"dcu-docker"
)
mkdir
SOURCES RPMS BUILD SRPMS BUILDROOT
for
file
in
"
${
source
[@]
}
"
do
rm
-rf
SOURCES/
$file
>
/dev/null 2>&1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment