Skip to content

Commit

Permalink
Update setup script to work with new releases
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Mar 8, 2024
1 parent c38f27b commit 06e0787
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions setup_odin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ ODIN_RELEASE_ID=dev-2024-03
echo "Setting up LLVM 14 and Odin ${ODIN_RELEASE_ID}..."

wget -O odin.zip -q https://github.com/odin-lang/Odin/releases/download/${ODIN_RELEASE_ID}/odin-ubuntu-amd64-${ODIN_RELEASE_ID}.zip
unzip odin.zip -d /home/runner/odin
chmod +x /home/runner/odin/odin
unzip odin.zip
unzip dist.zip
cp -r dist/* /home/runner/odin

echo "/home/runner/odin" >>$GITHUB_PATH
echo "/usr/lib/llvm-14/bin" >>$GITHUB_PATH
Expand All @@ -17,3 +18,21 @@ echo "Done!"
echo "llvm: $(llvm-config --version)"
echo "wasm-ld: $(wasm-ld --version)"
echo "odin: $(odin version)"

if ! command -v llvm-config &> /dev/null
then
echo "llvm-config could not be found"
exit 1
fi

if ! command -v wasm-ld &> /dev/null
then
echo "wasm-ld could not be found"
exit 1
fi

if ! command -v odin &> /dev/null
then
echo "odin could not be found"
exit 1
fi

0 comments on commit 06e0787

Please sign in to comment.