mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
* refactor project structure * environment-based default registry * fix tests * update build container * use docker platform for iso build emulation * simplify compat * Fix docker platform spec in run-compat.sh * handle riscv compat * fix bug with dep error exists attr * undo removal of sorting * use qemu for iso stage --------- Co-authored-by: Mariusz Kogen <k0gen@pm.me> Co-authored-by: Matt Hill <mattnine@protonmail.com>
31 lines
714 B
Bash
Executable File
31 lines
714 B
Bash
Executable File
#!/bin/bash
|
|
|
|
pwd=$(pwd)
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/../.."
|
|
|
|
set -e
|
|
|
|
rel_pwd="${pwd#"$(pwd)"}"
|
|
|
|
COMPAT_ARCH=$(uname -m)
|
|
|
|
platform=linux/$COMPAT_ARCH
|
|
|
|
case $COMPAT_ARCH in
|
|
x86_64)
|
|
platform=linux/amd64;;
|
|
aarch64)
|
|
platform=linux/arm64;;
|
|
esac
|
|
|
|
if [ "$FORCE_COMPAT" = 1 ] || ( [ "$REQUIRES" = "linux" ] && [ "$(uname -s)" != "Linux" ] ) || ( [ "$REQUIRES" = "debian" ] && ! which dpkg > /dev/null ); then
|
|
if tty -s; then
|
|
USE_TTY="-it"
|
|
fi
|
|
|
|
docker run $USE_TTY --platform=$platform -eARCH -eENVIRONMENT -ePLATFORM -eGIT_BRANCH_AS_HASH -ePROJECT -eDEPENDS -eCONFLICTS -w "/root/start-os${rel_pwd}" --rm -v "$(pwd):/root/start-os" start9/build-env $@
|
|
else
|
|
exec $@
|
|
fi
|