core: 安装 ed

alpine v3.19 busybox 去掉了 ed
07181862d3
This commit is contained in:
bin456789 2023-12-13 21:56:37 +08:00
parent 84948db5d3
commit f8e58ab876
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -459,6 +459,7 @@ insert_into_file() {
regex_to_find=$3
if [ "$location" = HEAD ]; then
apk add ed
in=$(mktemp)
cat /dev/stdin >$in
echo -e "0r $in \n w \n q" | ed $file >/dev/null