From 515e92ebb6b1cc29756fa5a6067655a24468a4d1 Mon Sep 17 00:00:00 2001 From: Juhamatti Kuusisaari Date: Thu, 19 Apr 2018 15:00:02 +0300 Subject: [PATCH] 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 Reviewed-by: Ferruh Yigit --- devtools/checkpatches.sh | 2 +- devtools/get-maintainer.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index 7676a6b501..2bb5458964 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 diff --git a/devtools/get-maintainer.sh b/devtools/get-maintainer.sh index 1e9eabd959..b9160486ad 100755 --- a/devtools/get-maintainer.sh +++ b/devtools/get-maintainer.sh @@ -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 -- 2.20.1