support path prefix

This commit is contained in:
Lance Vick 2023-07-20 18:24:42 -07:00
parent 352783aa65
commit 2560e543a1
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
2 changed files with 3 additions and 0 deletions

View File

@ -318,6 +318,7 @@ define toolchain
$(2) \
--env UID=$(UID) \
--env GID=$(GID) \
--env PATH_PREFIX=$(PATH_PREFIX) \
--platform=linux/$(ARCH) \
--privileged \
--cpus $(CPUS) \

View File

@ -5,6 +5,8 @@ uid=${UID?}
gid=${GID?}
user=${USER:-"build"}
export HOME="/home/${user}"
[ ! -z "$PATH_PREFIX" ] && \
export PATH="${PATH_PREFIX}:${PATH}"
# If running user is not root, pivot to custom user/group
if [ "$uid" != "0" ]; then