Handle properly a case where DPDK_PATCH_PATH is set
to point to a directory.

Signed-off-by: Juhamatti Kuusisaari <juhamatti.kuusisa...@coriant.com>
---
 devtools/checkpatches.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 7676a6b..2bb5458 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -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
-- 
2.8.1

Reply via email to