devtools: check Linux script path if directory

Handle properly a case where the path (DPDK_PATCH_PATH
or DPDK_MAINTAINER_PATH) is set to point to a directory.

Signed-off-by: Juhamatti Kuusisaari <juhamatti.kuusisaari@coriant.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Juhamatti Kuusisaari 2018-04-19 15:00:02 +03:00 committed by Thomas Monjalon
parent 5a141fb494
commit 515e92ebb6
2 changed files with 3 additions and 2 deletions

View File

@ -75,7 +75,7 @@ while getopts hn:qv ARG ; do
done
shift $(($OPTIND - 1))
if [ ! -x "$DPDK_CHECKPATCH_PATH" ] ; then
if [ ! -f "$DPDK_CHECKPATCH_PATH" ] || [ ! -x "$DPDK_CHECKPATCH_PATH" ] ; then
print_usage >&2
echo
echo 'Cannot execute DPDK_CHECKPATCH_PATH' >&2

View File

@ -23,7 +23,8 @@ print_usage () {
}
# Requires DPDK_GETMAINTAINER_PATH devel config option set
if [ ! -x "$DPDK_GETMAINTAINER_PATH" ] ; then
if [ ! -f "$DPDK_GETMAINTAINER_PATH" ] ||
[ ! -x "$DPDK_GETMAINTAINER_PATH" ] ; then
print_usage >&2
echo
echo 'Cannot execute DPDK_GETMAINTAINER_PATH' >&2