Skip to content

Commit

Permalink
host: add pkg check for non debian/redhat
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information
RobertCNelson committed Aug 13, 2019
1 parent 0178e9a commit 85da28a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tools/host_det.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -625,6 +625,28 @@ elif [ "${git_major}" -eq "${compare_major}" ] ; then
fi fi
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 case "$BUILD_HOST" in
redhat*) redhat*)
redhat_reqs || error "Failed dependency check" redhat_reqs || error "Failed dependency check"
Expand Down

0 comments on commit 85da28a

Please sign in to comment.