Skip to content

Commit

Permalink
build: autodetect cosmocc in path
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP committed Nov 14, 2024
1 parent 3490f80 commit 97919b1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions build
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
#!/bin/sh -e

export COSMO="${COSMO:-/opt/cosmo}"
export COSMOS="${COSMOS:-/opt/cosmos}"
COSMOS="${COSMOS:-/opt/cosmos}"
if ! [ -d "${COSMOS}" ] && [ -f "${COSMOS}/bin/cosmocc" ]
then
if ! command -v cosmocc >/dev/null
then
echo "You need to add cosmopolitan toolchain to your environment variable:"
echo "export COSMOS=/opt/cosmos"
exit 1
fi

COSMOS="$(dirname "$(dirname "$(command -v cosmocc)")")"
fi
export COSMOS

FLAGS="-I deps/sokol \
-I deps/cimgui \
Expand Down

0 comments on commit 97919b1

Please sign in to comment.