1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +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

@ -85,7 +85,7 @@ mkdir -p mnt/dev
echo "done"
printf "writing version file... "
GIT_HASH=$( (git log --pretty=format:'%h' -n 1 | head -c 7) || true )
GIT_HASH=$( (git log --pretty=format:'%h' -n 1 | cut -c1-7) || true )
printf "[Version]\nMajor=1\nMinor=0\nGit=%s\n" "$GIT_HASH" > mnt/res/version.ini
echo "done"