From: Juhamatti Kuusisaari Date: Thu, 19 Apr 2018 12:00:02 +0000 (+0300) Subject: devtools: check Linux script path if directory X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=515e92ebb6b1cc29756fa5a6067655a24468a4d1;p=dpdk.git 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 --- 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