All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhaoyu Liu <zackary.liu.pro@gmail.com>
To: gregkh@linuxfoundation.org, masahiroy@kernel.org,
	ripxorip@gmail.com, zackary.liu.pro@gmail.com,
	mpe@ellerman.id.au
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] scripts/tags: merge "TAGS" and "tags" in case
Date: Wed, 3 Nov 2021 23:35:29 +0800	[thread overview]
Message-ID: <20211103153522.GA23842@pc> (raw)

merge "TAGS" and "tags" for the code more concise

Signed-off-by: Zhaoyu Liu <zackary.liu.pro@gmail.com>
---
 scripts/tags.sh | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 16d475b3e203..a9181dd0fee2 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -315,15 +315,11 @@ case "$1" in
 		dogtags
 		;;
 
-	"tags")
-		rm -f tags
-		xtags ctags
-		remove_structs=y
-		;;
-
-	"TAGS")
-		rm -f TAGS
-		xtags etags
+	"TAGS" | "tags")
+		rm -f $1
+		xtags $([ $1 = "tags" ]	\
+			&& echo ctags		\
+			|| echo etags)
 		remove_structs=y
 		;;
 esac
-- 
2.17.1


             reply	other threads:[~2021-11-03 15:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 15:35 Zhaoyu Liu [this message]
2021-11-26 15:58 ` [PATCH] scripts/tags: merge "TAGS" and "tags" in case Greg KH
2021-11-27  1:33   ` Zackary Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211103153522.GA23842@pc \
    --to=zackary.liu.pro@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=ripxorip@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.