Skip to content

Commit

Permalink
Use GNU sed on Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
byteduck committed Apr 4, 2024
1 parent 8dec821 commit cc9bd2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion toolchain/build-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ build_gcc () {
make_toolchain_file () {
msg "Making CMakeToolchain.txt..."
cp "$DIR/CMakeToolchain.txt.in" "$BUILD/CMakeToolchain.txt"
sed -i "s/@DUCKOS_SOURCE_DIR@/$(echo "$SOURCE_DIR" | sed -r 's/\//\\\//g')/g" "$BUILD/CMakeToolchain.txt"
$SED_BIN -i "s/@DUCKOS_SOURCE_DIR@/$(echo "$SOURCE_DIR" | sed -r 's/\//\\\//g')/g" "$BUILD/CMakeToolchain.txt"
}

mkdir -p "$BUILD"
Expand Down
1 change: 1 addition & 0 deletions toolchain/toolchain-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ INSTALL_BIN="install"

if [ "$SYS_NAME" = "Darwin" ]; then
INSTALL_BIN="ginstall"
SED_BIN="gsed"
fi

download-binutils () {
Expand Down

0 comments on commit cc9bd2f

Please sign in to comment.