From patchwork Wed Apr 6 15:31:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Juraj_Linke=C5=A1?= X-Patchwork-Id: 109327 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D73D0A0509; Wed, 6 Apr 2022 17:32:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82B2242886; Wed, 6 Apr 2022 17:31:57 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 4D41D40689 for ; Wed, 6 Apr 2022 17:31:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 35B72184FF4; Wed, 6 Apr 2022 17:31:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2OcN2Q2KE4w4; Wed, 6 Apr 2022 17:31:53 +0200 (CEST) Received: from entguard.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 9FE7B184FE9; Wed, 6 Apr 2022 17:31:52 +0200 (CEST) From: =?utf-8?q?Juraj_Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, Honnappa.Nagarahalli@arm.com, ohilyard@iol.unh.edu, lijuan.tu@intel.com Cc: dev@dpdk.org, =?utf-8?q?Juraj_Linke=C5=A1?= Subject: [RFC PATCH v1 1/8] dts: merge DTS format.sh to DPDK Date: Wed, 6 Apr 2022 15:31:44 +0000 Message-Id: <20220406153151.2917346-2-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220406153151.2917346-1-juraj.linkes@pantheon.tech> References: <20220406153151.2917346-1-juraj.linkes@pantheon.tech> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --- dts/format.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 dts/format.sh diff --git a/dts/format.sh b/dts/format.sh new file mode 100755 index 0000000000..d35c0bf1da --- /dev/null +++ b/dts/format.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +function main() { + # The directory to work on is either passed in as argument 1, + # or is the current working directory + DIRECTORY=${1:-`pwd`} + LINE_LENGTH=88 + + isort \ + --overwrite-in-place \ + --profile black \ + -j `nproc` \ + --line-length $LINE_LENGTH \ + --python-version auto \ + $DIRECTORY + + black \ + --line-length $LINE_LENGTH \ + --required-version 22.1.0 \ + --target-version py38 \ + --safe \ + $DIRECTORY +} + +function help() { + echo "usage: format.sh " +} + +if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then + help + exit 0 +fi + +main "$1" +