xrsh-buildroot/build.sh

23 lines
472 B
Bash
Executable File

#!/usr/bin/env bash
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/*
docker images | grep buildroot || docker build -t buildroot .
docker run \
--rm \
--name build-v86 \
-v $PWD/dist:/build \
-v $PWD/buildroot-v86/:/buildroot-v86 ${EDIT} \
buildroot
echo "See ./dist for built ISO"