core: 安装 ed

alpine v3.19 busybox 去掉了 ed
https://gitlab.alpinelinux.org/alpine/aports/-/commit/07181862d3c61a412edd6353a9220fccb00fadf1
This commit is contained in:
bin456789
2023-12-13 21:56:37 +08:00
parent 84948db5d3
commit f8e58ab876
+1
View File
@@ -459,6 +459,7 @@ insert_into_file() {
regex_to_find=$3 regex_to_find=$3
if [ "$location" = HEAD ]; then if [ "$location" = HEAD ]; then
apk add ed
in=$(mktemp) in=$(mktemp)
cat /dev/stdin >$in cat /dev/stdin >$in
echo -e "0r $in \n w \n q" | ed $file >/dev/null echo -e "0r $in \n w \n q" | ed $file >/dev/null