From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id C0B03C166 for ; Tue, 16 Feb 2016 15:37:14 +0100 (CET) Received: by mail-wm0-f41.google.com with SMTP id a4so103127587wme.1 for ; Tue, 16 Feb 2016 06:37:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=OwJNw9Bhyaz52g/6MNK9WsDCpVSlYOWeCx6FR5eLozM=; b=Zt9z7xitbwuOfSF7aVpudsqeWhPP8WOaoaycPWJl9FdwVPuejrkmmkBE/ujMcI7/jc dLMEre+4NPfj6tMlqzZQTb+K/XpQSyY7ab1Jrf+5i/YHy1K/LZCTBH1Bd+JAvr9aK81Z eSQ+WOGP8PavC/djTSKlhY7e1MstKwu4eLzwPDmG4GjtIDtF48Ba6RDuo9t1A6BPLR+w 270dFlNkv0TVjRIZZHABSyPcAZuugKp3Mwm/YBhQROMxkQM8ETQTVhZ/M3Foswr4ox09 HnS/B2W9Vkn19/LiQyepGac4AjOueBNnvDj6qMBOqUBFQ+7y7s/TiX7FU17yiq37Kw2P Q7PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=OwJNw9Bhyaz52g/6MNK9WsDCpVSlYOWeCx6FR5eLozM=; b=fMPW57kAtQgDv0HiEfbSb2SKeV97Bf2lIR0KZeiPqVzbhw7Niure96zpzzV5a6Fynt /CPt0h1YVbBO30n6uZROisn0BRftIiZJ+QILXB1LtaKdI4yzfp6+y/vMbVafG/8VtFNz bEKHltTfwTGrOLDxyvT0EohPMJkM29/p4QHjqdMFZ6ZhYqUoytNBcfzlrJmMUH5zCZ6G vsAZRoLgpV6qouYkapg3cg8tzT+stB3AwCdudgyD/bBbpwlXAUSfaS4acpYyJ4v8r/97 sOXMu0jZzOJW5xgdq7x8BD/N2uajzl3/HK7wv+jth+h+/V+DNnlNHkNvd7Qp6fPM45uD 3DsQ== X-Gm-Message-State: AG10YOSBuj9LGv+C4B+Mk57YHDIDDHQqtYa0eSsRf9jpvuE8TBX9I742d3SiwDM/bEMqwVO5 X-Received: by 10.194.121.136 with SMTP id lk8mr25622464wjb.92.1455633434630; Tue, 16 Feb 2016 06:37:14 -0800 (PST) Received: from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id s2sm30554002wjs.39.2016.02.16.06.37.13 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 16 Feb 2016 06:37:13 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Tue, 16 Feb 2016 15:36:54 +0100 Message-Id: <1455633414-4778-1-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.4 Subject: [dpdk-dev] [PATCH] scripts: fix checkpatch help X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 14:37:14 -0000 When started without defining DPDK_CHECKPATCH_PATH, the usage was not displayed. Signed-off-by: Olivier Matz --- scripts/checkpatches.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/checkpatches.sh b/scripts/checkpatches.sh index afc611b..1e765e3 100755 --- a/scripts/checkpatches.sh +++ b/scripts/checkpatches.sh @@ -34,10 +34,6 @@ # - DPDK_CHECKPATCH_PATH # - DPDK_CHECKPATCH_LINE_LENGTH . scripts/load-devel-config.sh -if [ ! -x "$DPDK_CHECKPATCH_PATH" ] ; then - echo 'Cannot execute DPDK_CHECKPATCH_PATH' >&2 - exit 1 -fi length=${DPDK_CHECKPATCH_LINE_LENGTH:-80} @@ -51,7 +47,12 @@ SPLIT_STRING,LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\ NEW_TYPEDEFS,COMPARISON_TO_NULL" print_usage () { - echo "usage: $(basename $0) [-q] [-v] [patch1 [patch2] ...]]" + cat <<- END_OF_HELP + usage: $(basename $0) [-q] [-v] [patch1 [patch2] ...]] + + Run Linux kernel checkpatch.pl with DPDK options. + The environment variable DPDK_CHECKPATCH_PATH must be set. + END_OF_HELP } quiet=false @@ -66,6 +67,13 @@ while getopts hqv ARG ; do done shift $(($OPTIND - 1)) +if [ ! -x "$DPDK_CHECKPATCH_PATH" ] ; then + print_usage + echo + echo 'Cannot execute DPDK_CHECKPATCH_PATH' >&2 + exit 1 +fi + status=0 for p in "$@" ; do ! $verbose || printf '\n### %s\n\n' "$p" -- 2.1.4