mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
toolchain-shar-relocate.sh: Add check for missing command 'file'
On a machine without the file command, the SDK install fails with a cryptic error message. ``` xargs: file: No such file or directory sed: no input files Failed to replace perl. Relocate script failed. Abort! ``` Add a test for 'file' to print a clear error message. ``` The command 'file' is required by the relocation script, please install it first. Abort! ``` (From OE-Core rev: 1aa19b9e34ebe6f39a25364073fed4c069f650e8) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
62c184ed61
commit
084fe2241b
@@ -1,7 +1,9 @@
|
||||
if ! xargs --version > /dev/null 2>&1; then
|
||||
echo "xargs is required by the relocation script, please install it first. Abort!"
|
||||
for cmd in xargs file; do
|
||||
if ! command -v $cmd > /dev/null 2>&1; then
|
||||
echo "The command '$cmd' is required by the relocation script, please install it first. Abort!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# fix dynamic loader paths in all ELF SDK binaries
|
||||
# allow symlinks to be accessed via the find command too
|
||||
|
||||
Reference in New Issue
Block a user