support path prefix
This commit is contained in:
parent
352783aa65
commit
2560e543a1
1
Makefile
1
Makefile
|
@ -318,6 +318,7 @@ define toolchain
|
||||||
$(2) \
|
$(2) \
|
||||||
--env UID=$(UID) \
|
--env UID=$(UID) \
|
||||||
--env GID=$(GID) \
|
--env GID=$(GID) \
|
||||||
|
--env PATH_PREFIX=$(PATH_PREFIX) \
|
||||||
--platform=linux/$(ARCH) \
|
--platform=linux/$(ARCH) \
|
||||||
--privileged \
|
--privileged \
|
||||||
--cpus $(CPUS) \
|
--cpus $(CPUS) \
|
||||||
|
|
|
@ -5,6 +5,8 @@ uid=${UID?}
|
||||||
gid=${GID?}
|
gid=${GID?}
|
||||||
user=${USER:-"build"}
|
user=${USER:-"build"}
|
||||||
export HOME="/home/${user}"
|
export HOME="/home/${user}"
|
||||||
|
[ ! -z "$PATH_PREFIX" ] && \
|
||||||
|
export PATH="${PATH_PREFIX}:${PATH}"
|
||||||
|
|
||||||
# If running user is not root, pivot to custom user/group
|
# If running user is not root, pivot to custom user/group
|
||||||
if [ "$uid" != "0" ]; then
|
if [ "$uid" != "0" ]; then
|
||||||
|
|
Loading…
Reference in New Issue