xrsh-buildroot/build.sh

26 lines
535 B
Bash
Raw Normal View History

2019-04-26 19:40:09 +02:00
#!/usr/bin/env bash
2025-01-15 18:00:55 +01:00
set -x
2019-04-26 19:40:09 +02:00
2024-09-11 14:58:31 +02:00
test "$1" = "--edit" && {
EDIT="-ti -v $PWD/edit.sh:/root/edit.sh --entrypoint bash"
}
#-v $PWD/cache:/root/buildroot-2021.02-rc2/output
test -d dist || mkdir dist
test -d cache || mkdir cache
rm -rf cache/*
2025-01-15 18:00:55 +01:00
OCI=$(which podman || which docker)
2019-04-26 19:40:09 +02:00
2025-01-15 18:00:55 +01:00
$OCI images | grep buildroot || $OCI build -t buildroot .
#$OCI --conmon /usr/bin/false run \
$OCI run \
2019-04-26 19:40:09 +02:00
--name build-v86 \
-v $PWD/dist:/build \
2024-09-11 14:58:31 +02:00
-v $PWD/buildroot-v86/:/buildroot-v86 ${EDIT} \
2019-04-26 19:40:09 +02:00
buildroot
echo "See ./dist for built ISO"