diff options
author | Linus Groh <mail@linusgroh.de> | 2023-03-13 18:55:15 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-13 20:12:44 +0000 |
commit | 6d19a9f9da8ad19835f99bdbf827dd82fb87bc10 (patch) | |
tree | 6b6a488e62c21ca2add7e3dc94f37bc0556e8c36 /Toolchain | |
parent | d21d1d99bd742e6c95475d15b2e4379c592abc5f (diff) | |
download | serenity-6d19a9f9da8ad19835f99bdbf827dd82fb87bc10.zip |
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.
Diffstat (limited to 'Toolchain')
-rwxr-xr-x | Toolchain/BuildClang.sh | 2 | ||||
-rwxr-xr-x | Toolchain/BuildIt.sh | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Toolchain/BuildClang.sh b/Toolchain/BuildClang.sh index a837dbbe21..6238dee1c6 100755 --- a/Toolchain/BuildClang.sh +++ b/Toolchain/BuildClang.sh @@ -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 diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 2d81d6fb4f..5596ac226e 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -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 |