]> code.octet-stream.net Git - hashgood/blob - buildscripts/init.sh
Fix clippy lint for write! vs writeln!
[hashgood] / buildscripts / init.sh
1 #!/bin/bash
2 set -euxo pipefail
3 cd "$(git rev-parse --show-toplevel)"
4
5 PLATFORM=$1
6
7 case $PLATFORM in
8 mac-x86_64)
9 RUST_TARGET=x86_64-apple-darwin
10 ;;
11 mac-arm64)
12 RUST_TARGET=aarch64-apple-darwin
13 ;;
14 linux-x86_64)
15 RUST_TARGET=x86_64-unknown-linux-gnu
16 ;;
17 linux-armhf)
18 RUST_TARGET=armv7-unknown-linux-gnueabihf
19 ;;
20 linux-arm64)
21 RUST_TARGET=aarch64-unknown-linux-gnu
22 ;;
23 windows-x86_64)
24 RUST_TARGET=x86_64-pc-windows-msvc
25 ;;
26 *)
27 echo "Unrecognised platform"
28 exit 1
29 ;;
30 esac
31
32 export RUST_TARGET