mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-04 01:37:34 -08:00
sysroot.eclass: Add sysroot_run_prefixed convenience function
This is for simple cases where you just need to run a command immediately rather than pass a wrapper to a build tool. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
parent
fdd48738b3
commit
68f87a7fe8
@ -106,3 +106,16 @@ sysroot_make_run_prefixed() {
|
|||||||
|
|
||||||
echo "${SCRIPT}"
|
echo "${SCRIPT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @FUNCTION: sysroot_run_prefixed
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# Create a wrapper script with sysroot_make_run_prefixed if necessary, and use
|
||||||
|
# it to execute the given command, otherwise just execute the command directly.
|
||||||
|
sysroot_run_prefixed() {
|
||||||
|
local script
|
||||||
|
if script=$(sysroot_make_run_prefixed); then
|
||||||
|
"${script}" "${@}"
|
||||||
|
else
|
||||||
|
"${@}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user