Skip to content
Permalink
Browse files

host: add pkg check for non debian/redhat

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information...
RobertCNelson committed Aug 13, 2019
1 parent 0178e9a commit 85da28a94a2978c0702e9aaa95e73e8baa80c504
Showing with 22 additions and 0 deletions.
  1. +22 −0 tools/host_det.sh
@@ -625,6 +625,28 @@ elif [ "${git_major}" -eq "${compare_major}" ] ; then
fi
fi

echo "-----------------------------"
unset NEEDS_COMMAND
check_for_command () {
if ! which "$1" >/dev/null 2>&1 ; then
echo "You're missing command $1"
NEEDS_COMMAND=1
else
version=$(LC_ALL=C $1 $2 | head -n 1)
echo "$1: $version"
fi
}

unset NEEDS_COMMAND
check_for_command cpio --version
check_for_command lzop --version

if [ "${NEEDS_COMMAND}" ] ; then
echo "Please install missing commands"
echo "-----------------------------"
exit 2
fi

case "$BUILD_HOST" in
redhat*)
redhat_reqs || error "Failed dependency check"

0 comments on commit 85da28a

Please sign in to comment.
You can’t perform that action at this time.