aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorsh!zeeg <shizeeque@gmail.com>2025-01-10 04:42:31 +0300
committersh!zeeg <shizeeque@gmail.com>2025-01-10 04:42:31 +0300
commitd8454bea12a9122eb42251899f42fdf109298aa4 (patch)
tree7a1f33043f6200237c1d76475efe6cf80abf45a0 /build.sh
parenta9853fc6dd92ca4491692bf7c060d057e95ef4a5 (diff)
Fix make `ols version` work with GNU sed and BSD/macOS sed
since GNU sed and BSD sed behave differently update VERSION using a temporary file
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index cd760bb..7b83cf3 100755
--- a/build.sh
+++ b/build.sh
@@ -48,6 +48,6 @@ fi
version="$(git describe --tags --abbrev=7)"
version="${version%-*}:${version##*-}"
-sed -i "" "s|VERSION :: .*|VERSION :: \"${version}\"|g" src/main.odin
+sed "s|VERSION :: .*|VERSION :: \"${version}\"|g" src/main.odin > /tmp/main.odin.build && mv -f /tmp/main.odin.build src/main.odin
odin build src/ -show-timings -collection:src=src -out:ols -microarch:native -no-bounds-check -o:speed $@