1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:27:34 +00:00

Build: Sprinkle some portability, fix on OpenBSD

realpath(1) is specific to coreutils and its behavior can be had
with readlink -f

Create the Toolchain Build directory if it doesn't exist before
calling readlink, since realpath(3) on at least OpenBSD will error
on a non-existent path
This commit is contained in:
joshua stein 2020-12-28 17:36:15 -06:00 committed by Andreas Kling
parent 4021264201
commit 0d215b5548
4 changed files with 15 additions and 6 deletions

View file

@ -22,7 +22,7 @@ trap cleanup 0 1 2 3 6
"$@" > "${DST_FILE}.tmp"
# If we get here, the command was successful, and we can overwrite the destination.
if ! cmp --quiet -- "${DST_FILE}.tmp" "${DST_FILE}"; then
if ! cmp -s -- "${DST_FILE}.tmp" "${DST_FILE}"; then
# File changed, need to overwrite:
mv -f -- "${DST_FILE}.tmp" "${DST_FILE}"
fi