![Thomas De Schampheleire](/assets/img/avatar_default.png)
If xzcat is not present on the host system, buildroot bails out early asking the developer to install it (xzcat is now a DL_TOOLS_DEPENDENCY) Conversely, when BR2_TARGET_ROOTFS_CPIO_XZ is enabled, then host-xz is a build dependency, and no manual action is required from the developer. Because the second approach is nicer, also build host-xz when xzcat is not available, using the host-prerequisite and suitable-host-pkg mechanisms, already used for tar. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
15 lines
223 B
Bash
Executable file
15 lines
223 B
Bash
Executable file
#!/bin/sh
|
|
|
|
candidate="$1"
|
|
|
|
xzcat=`which $candidate 2>/dev/null`
|
|
if [ ! -x "$xzcat" ]; then
|
|
xzcat=`which xzcat 2>/dev/null`
|
|
if [ ! -x "$xzcat" ]; then
|
|
# echo nothing: no suitable xzcat found
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
echo $xzcat
|