diff options
author | joshua stein <jcs@jcs.org> | 2020-12-28 17:36:15 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-14 09:29:22 +0100 |
commit | 0d215b55487ca3ea66a77463c85d98956fa07f0b (patch) | |
tree | c156e8fcb62e5714cdff5884697429fc5e5a2d29 /Meta/build-root-filesystem.sh | |
parent | 4021264201d99372fb1e84899be9ae84a5510415 (diff) | |
download | serenity-0d215b55487ca3ea66a77463c85d98956fa07f0b.zip |
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
Diffstat (limited to 'Meta/build-root-filesystem.sh')
-rwxr-xr-x | Meta/build-root-filesystem.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Meta/build-root-filesystem.sh b/Meta/build-root-filesystem.sh index fc3280cce4..08252e0136 100755 --- a/Meta/build-root-filesystem.sh +++ b/Meta/build-root-filesystem.sh @@ -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" |