Toolchain: Use '|' as sed delimiter in Build{Clang,It}.sh, not '@'

The latter is problematic as it may be contained in the username (e.g.
email address-like) and thus the $SRC_ROOT path. This would cause an
invalid sed command to be created, breaking both of these scripts.
This commit is contained in:
Linus Groh 2023-03-13 18:55:15 +00:00
parent d21d1d99bd
commit 6d19a9f9da
Notes: sideshowbarker 2024-07-17 02:57:43 +09:00
2 changed files with 4 additions and 4 deletions

View file

@ -255,7 +255,7 @@ for arch in $ARCHS; do
pushd "$BUILD/${arch}clang"
mkdir -p Root/usr/include/
for header in $FILES; do
target=$(echo "$header" | "$SED" -e "s@$SRC_ROOT/Userland/Libraries/LibC@@" -e "s@$SRC_ROOT/Kernel/@Kernel/@")
target=$(echo "$header" | "$SED" -e "s|$SRC_ROOT/Userland/Libraries/LibC||" -e "s|$SRC_ROOT/Kernel/|Kernel/|")
buildstep "system_headers" "$INSTALL" -D "$header" "Root/usr/include/$target"
done
popd

View file

@ -397,9 +397,9 @@ pushd "$DIR/Build/$ARCH"
-name '*.h' -print)
for header in $FILES; do
target=$(echo "$header" | sed \
-e "s@$SRC_ROOT/AK/@AK/@" \
-e "s@$SRC_ROOT/Userland/Libraries/LibC@@" \
-e "s@$SRC_ROOT/Kernel/@Kernel/@")
-e "s|$SRC_ROOT/AK/|AK/|" \
-e "s|$SRC_ROOT/Userland/Libraries/LibC||" \
-e "s|$SRC_ROOT/Kernel/|Kernel/|")
buildstep "system_headers" mkdir -p "$(dirname "Root/usr/include/$target")"
buildstep "system_headers" $INSTALL "$header" "Root/usr/include/$target"
done