Bugfix/mac build (#2726)

* fix mac build

* additional fixes

* handle arm64 from uname -m

* handle arm64 from uname -m in all builds

* gracefully handle rootless docker

* use cross-platform method of determining file uid
This commit is contained in:
Aiden McClelland
2024-08-26 16:52:23 -06:00
committed by GitHub
parent 9059855f2b
commit 571db5c0ee
15 changed files with 119 additions and 41 deletions

View File

@@ -2,14 +2,18 @@
cd "$(dirname "${BASH_SOURCE[0]}")"
set -e
set -ea
shopt -s expand_aliases
web="../web/dist/static"
[ -d "$web" ] || mkdir -p "$web"
if [ -z "$PLATFORM" ]; then
export PLATFORM=$(uname -m)
PLATFORM=$(uname -m)
fi
if [ "$PLATFORM" = "arm64" ]; then
PLATFORM="aarch64"
fi
cargo install --path=./startos --no-default-features --features=cli,docker,registry --bin start-cli --locked